![background image](http://html1.mh-extra.com/html/nec/v850e-ma1/v850e-ma1_user-manual_4538839355.webp)
CHAPTER 10 TIMER/COUNTER FUNCTION (REAL-TIME PULSE UNIT)
User’s Manual U14359EJ4V0UM
355
10.2.6 Timer D operation
(1) Compare operation
TMDn can be used for a compare operation in which the value that was set in a compare register (CMDn) is
compared with the TMDn count value (n = 0 to 3).
If a match is detected by the compare operation, an interrupt (INTCMDn) is generated. The generation of the
interrupt causes TMDn to be cleared (0) at the next count timing. This function enables timer D to be used as
an interval timer.
CMDn can also be set to 0. In this case, when an overflow occurs and TMDn becomes 0, a match is
detected and INTCMDn is generated. Although the TMDn value is cleared (0) at the next count timing,
INTCMDn is not generated by this match.
Figure 10-14. TMD0 Compare Operation Example (1/2)
(a) When CMD0 is set to n (non-zero)
1
0
n
n
TMD0
Count clock
CMD0
TMD0 clear
Match detected
(INTCMD0)
Count up
Clear
Remark
Interval time = (n + 1)
×
(Count clock cycle)
n = 1 to 65,536 (FFFFH)