Chapter 6 8-bit Timers

 

Setup Procedure

 

Description

 

 

 

 

(7)

Enable the interrupt.

 

(7) Set the TM0IE flag of the TM0ICR register to

 

TM0ICR (x'3FE9')

 

"1" to enable the interrupt.

 

bp1

:TM0IE

= 1

 

(8)

Start the event counting.

 

(8) Set the TM0EN flag of the TM0MD register to 1

 

TM0MD (x'3F54')

 

to start timer 0.

 

bp3

:TM0EN

= 1

 

 

 

 

 

 

Every time TM0BC detects the falling edge of TM0IO input , TM0BC counts up from 'x00'. When TM0BC reaches the setting value of theTM0OC register, the timer 0 interrupt request flag is set at the next count clock, then the value of TM0BC becomes x'00' and counting up is restarted.

VI - 22 8-bit Event Count

Page 236
Image 236
Panasonic MN101C77C, F77G user manual VI 22 8-bit Event Count