195
CHAPTER 8 8-BIT TIMER/EVENT COUNTERS 50, 51
User’s Manual U15798EJ2V0UD
8.5 Operation of 8-Bit Timer/Event Counters 50 and 51
8.5.1 Interval timer operation
The 8-bit timer/event counters operate as interval timers which generate interrupt requests repeatedly at intervals
of the count value preset to 8-bit timer compare register 5n (CR5n).
When the count values of 8-bit timer counter 5n (TM5n) match the values set to CR5n, counting continues with
the TM5n values cleared to 0 and the interrupt request signals (INTTM5n) are generated.
The count clock of TM5n can be selected with bits 0 to 2 (TCL5n0 to TCL5n2) of timer clock select register 5n
(TCL5n).
See
8.6 8-Bit Timer/Event Counter 50 and 51 Cautions (2)
about the operation when the compare register value
is changed during timer count operation.
[Setting]
<1> Set the registers.
• TCL5n: Select count clock.
• CR5n:
Compare value
• TMC5n: Count operation stops, clear and start mode by match of TM5n and CR5n.
(TMC5n = 0000
×××
0B
×
= don’t care)
<2>
After TCE5n = 1 is set, count operation starts.
<3>
If the values of TM5n and CR5n match, INTTM5n is generated (TM5n is cleared to 00H).
<4>
INTTM5n generates repeatedly at the same interval. Set TCE5n to 0 to stop count operation.
Remark
n = 0, 1
Figure 8-7. Interval Timer Operation Timings (1/3)
(a) Basic operation
t
Count clock
TM5n count value
CR5n
TCE5n
INTTM5n
TO5n
Start count
Clear
Clear
00H
01H
N
00H
01H
N
00H
01H
N
N
N
N
N
Interrupt request
acknowledged
Interrupt request
acknowledged
Interval time
Interval time
Remarks 1.
Interval time = (N + 1)
×
t
N = 00H to FFH
2.
n = 0, 1
Содержание mPD780344 Series
Страница 2: ...2 User s Manual U15798EJ2V0UD MEMO...