CHAPTER 7 TIMER/COUNTER FUNCTION
Preliminary User’s Manual U15905EJ1V0UD
250
7.3
Operation of 8-Bit Timer/Event Counters 2 to 5
7.3.1
Operation as interval timer (8 bits)
8-bit timer/event counter n operates as an interval timer that repeatedly generates interrupts at the interval of the
count value preset in 8-bit timer compare register n (CRn).
If the count value in 8-bit timer counter n (TMn) matches the value set in the CRn register, the value of the TMn
register is cleared to 0 and counting is continued, and at the same time, an interrupt request signal (INTTMn) is
generated.
Setting method
<1>
Set each register.
•
TCLn register: Selects the count clock (t).
•
CRn register:
Compare value (N)
•
TMCn register: Stops count operation and selects the mode in which clear & start occurs on a match
between the TMn register and CRn register (TMCn register = 0000xxx0B,
×
: don’t
care).
<2>
When the TCEn bit of the TMCn register is set to 1, the count operation starts.
<3>
When the values of the TMn register and CRn register match, INTTMn is generated (TMn register is
cleared to 00H).
<4>
Then, INTTMn is repeatedly generated at the same interval. To stop counting, set TCEn = 0.
Interval time = (N + 1)
×
t: N = 00H to FFH
Caution
During interval timer operation, do not rewrite the value of the CRn register.
Figure 7-18. Timing of Interval Timer Operation (1/2)
Basic operation
t
Interval time
Interval time
00H
N
01H
01H
00H
N
N
N
N
N
N
01H
00H
Clear
Interrupt acknowledgment Interrupt acknowledgment
Clear
Count clock
TMn count value
CRn
TOn
TCEn
INTTMn
Count start
Remark
n = 2 to 5
Содержание V850ES/SA2 UPD703201
Страница 2: ...Preliminary User s Manual U15905EJ1V0UD 2 MEMO ...
Страница 284: ... 4 6 7 6 7 8 9 9 6 Note 1 Note 2 0 0 9 9 6 1 1 0 1 9 0 0 0 6 7 0 0 0 0 0 0 0 1 1 1 0 0 0 0 3 1 6 7 6 7 ...
Страница 285: ... 6 7 ...
Страница 516: ...Preliminary User s Manual U15905EJ1V0UD 516 MEMO ...