
CHAPTER 10 TIMER/COUNTER FUNCTION (REAL-TIME PULSE UNIT)
350
User’s Manual U14359EJ4V0UM
10.2.4 Timer D
(1) Timers D0 to D3 (TMD0 to TMD3)
TMDn is a 16-bit timer. It is mainly used as an interval timer for software (n = 0 to 3).
Starting and stopping TMDn is controlled by the TMDCEn bit of the timer mode control register Dn (TMCDn)
(n = 0 to 3).
Division by the prescaler can be selected for the count clock from among f
XX
/4, f
XX
/8, f
XX
/16, f
XX
/32, f
XX
/64,
f
XX
/128, f
XX
/256, and f
XX
/512 by the CSn0 to CSn2 bits of the TMCDn register (f
XX
: internal system clock).
TMDn is read-only in 16-bit units.
TMD1
FFFFF550H
0000H
TMD2
FFFFF560H
0000H
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
TMD0
FFFFF540H
0000H
Address
After reset
0
TMD3
FFFFF570H
0000H
The conditions for which the TMDn register becomes 0000H are shown below (n = 0 to 3).
•
Reset input
•
TMDCAEn bit = 0
•
TMDCEn bit = 0
•
Match of TMDn register and CMDn register
•
Overflow
Cautions 1. If the TMDCAEn bit of the TMCDn register is cleared (0), a reset is performed
asynchronously.
2. If the TMDCEn bit of the TMCDn register is cleared (0), a reset is performed, in
synchronization with the internal clock. Similarly, a synchronized reset is performed
after a match with the CMDn register and after an overflow.
3. The count clock must not be changed during a timer operation. If it is to be overwritten,
it should be overwritten after the TMDCEn bit is cleared (0).
4. Up to 4 clocks are required after a value is set in the TMDCEn bit until the set value is
transferred to internal units. When a count operation begins, the count cycle from
0000H to 0001H differs from subsequent cycles.
5. After a compare match is generated, the timer is cleared at the next count clock.
Therefore, if the division ratio is large, the timer value may not be zero even if the timer
value is read immediately after a match interrupt is generated.
Содержание V850E/MA1
Страница 2: ...2 User s Manual U14359EJ4V0UM MEMO...