CHAPTER 7 TIMER/COUNTER FUNCTION
User’s Manual U13850EJ4V0UM
218
7.4 8-Bit Timer Operation
7.4.1 Operation as an interval timer (8-bit operation)
The timer operates as an interval timer that repeatedly generates interrupts at the interval of the preset count in 8-
bit compare register n (CRn0).
If the count in 8-bit counter n (TMn) matches the value set in CRn0, simultaneous to clearing the value of TMn to 0
and continuing the count, the interrupt request signal (INTTMn) is generated.
The TMn count clock can be selected by bits 0 to 2 (TCLn0 to TCLn2) in timer clock selection register n0 (TCLn0)
and by bit 0 (TCLn3) in timer clock selection register n1 (TCLn1) (n = 2 to 7).
Setting method
(1) Set each register.
• TCLn0, TCLn1: Selects the count clock.
• CRn0:
Compare value
• TMCn:
Selects the clear and start mode when TMn and CRn0 match.
(TMCn = 0000xxx0B, x is don’t care)
(2) When TCEn = 1 is set, counting starts.
(3) When the values of TMn and CRn0 match, INTTMn is generated (TMn is cleared to 00H).
(4) Then, INTTMn is repeatedly generated at the same interval. When counting stops, set TCEn = 0.
Figure 7-41. Timing of Interval Timer Operation (1/3)
Basic operation
TMn count value
CRn0
00H
01H
N
00H 01H
00H
01H
N
N
Count start
Clear
Clear
N
N
N
N
Interrupt acknowledgement
Interrupt
acknowledgement
TCEn
INTTMn
TOn
Interval time
Interval time
Interval time
Count clock
t
Remarks 1.
Interval time = (N + 1)
×
t; N = 00H to FFH
2.
n = 2 to 7
Содержание MPD703030A
Страница 2: ...User s Manual U13850EJ4V0UM 2 MEMO ...
Страница 514: ...User s Manual U13850EJ4V0UM 514 MEMO ...