English
Language : 

UPD784938 Datasheet, PDF (338/733 Pages) NEC – 16-Bit Single-Chip Microcontrollers
CHAPTER 11 TIMER/EVENT COUNTER 2
(2) Rewriting compare registers (CR20, CR21)
The output level of the timer output (TOn + 2: n + 2 = 2, 3) is not inverted even if the CR2n (n = 0, 1) value matches
the timer counter 2 (TM2) value more than once during one PWM output cycle.
Figure 11-26. Example of Compare Register (CR20W) Rewrite
FFFFH
FFFFH
TM2W
count value
T2
T1
T2
T1
0H
CR20W
T1
T2
TO2
Remark ALV2 = 1
CR20W
rewrite
CR20W and TM2W values match, but TO2 does not change here.
If a value smaller than that of the TM2 is set as the CR2n value, a 100% duty PWM signal will be output. CR2n rewriting
should be performed by the interrupt due to a match between TM2 and the CR2n on which the rewrite is performed.
Figure 11-27. Example of 100% Duty with PWM Output
FFH
FFH
FFH
FFH
TM2
count value
0H
n1
n1
n3
n2
n2
n2
CR20
n1
n2
TO2
Remark ALV2 = 0
338
When value n2 which is smaller than the TM2 value n3 is
written to CR20 here, the duty of this period will be 100%.
Preliminary User’s Manual U13987EJ1V0UM00