Panasonic MN101C77C, F77G user manual VII 18 16-bit Event Count

Models: F77G MN101C77C

1 544
Download 544 pages 59.61 Kb
Page 278
Image 278

Chapter 7 16-bit Timer

 

Setup Procedure

 

 

 

Description

 

 

 

 

 

(6)

Set the interrupt level.

 

(6)

Set the interrupt level by the TM7LV1-0 flag of

 

TM7ICR (x'3FF1')

 

 

the timer 7 interrupt control register (TM7ICR).

 

bp7-6

:TM7LV1-0

= 10

 

If any interrupt request flag may be already set,

 

 

 

 

 

clear those request flags.

 

 

 

 

 

[

Chapter 3 3-1-4. Interrupt Flag Setup ]

(7)

Enable the interrupt.

 

(7)

Set the TM7IE flag of the TM7ICR register to

 

TM7ICR (x'3FF1')

 

 

"1" to enable interrupt.

 

bp1

: TM7IE

= 1

 

 

 

(8)

Start the event count.

 

(8)

Set the TM7EN flag of the TM7MD 1 register to

 

TM7MD1 (x'3F78')

 

 

"1" to start timer 7.

 

bp4

: TM7EN

= 1

 

 

 

 

 

 

 

 

 

 

Every time TM7BC detects the falling edge of the TM7IO input, TM7BC counts up from x'0000'. When the TM7BC reaches the setting value of the TM7OC1 register, the timer 7 interrupt request flag is set at the next count clock, then the value of TM7BC becomes x'0000' and counting up is restarted.

VII - 18 16-bit Event Count

Page 278
Image 278
Panasonic MN101C77C, F77G user manual VII 18 16-bit Event Count