CHAPTER 7 8-BIT TIMER/EVENT COUNTER 50
Preliminary User’s Manual U16846EJ1V0UD
148
7.4 Operations of 8-Bit Timer/Event Counter 50
7.4.1 Operation as interval timer
8-bit timer/event counter 50 operates as an interval timer that generates interrupt requests repeatedly at intervals
of the count value preset to 8-bit timer compare register 50 (CR50).
When the count value of 8-bit timer counter 50 (TM50) matches the value set to CR50, counting continues with the
TM50 value cleared to 0 and an interrupt request signal (INTTM50) is generated.
The count clock of TM50 can be selected with bits 0 to 2 (TCL500 to TCL502) of timer clock selection register 50
(TCL50).
Setting
<1> Set the registers.
•
TCL50:
Select the count clock.
•
CR50:
Compare
value
•
TMC50: Stop the count operation, select clear & start mode entered on a match of TM50 and CR50.
(TMC50 = 0000
×××
0B
×
= Don’t care)
<2> After TCE50 = 1 is set, the count operation starts.
<3> If the values of TM50 and CR50 match, INTTM50 is generated (TM50 is cleared to 00H).
<4> INTTM50 is generated repeatedly at the same interval.
Set TCE50 to 0 to stop the count operation.
Caution Do not write other values to CR50 during operation.
Figure 7-7. Interval Timer Operation Timing (1/2)
(a) Basic operation
t
Count clock
TM50 count value
CR50
TCE50
INTTM50
Count start
Clear
Clear
00H
01H
N
00H
01H
N
00H
01H
N
N
N
N
N
Interrupt acknowledged
Interrupt acknowledged
Interval time
Interval time
Remark Interval time = (N + 1)
×
t
N = 00H to FFH