UPD784026 Renesas Electronics Corporation., UPD784026 Datasheet - Page 353

no-image

UPD784026

Manufacturer Part Number
UPD784026
Description
16/8-bit Single-chip Microcontrollers
Manufacturer
Renesas Electronics Corporation.
Datasheet
(3) Rewriting compare register (CR21)
Remark ALV2 = 1
If the current value of the CR21 is changed to a smaller value, and the CR21 value is made smaller than the register
2 (TM2) value, the PPG cycle at that time will be extended to the time equivalent to a full-count by TM2. If CR21 is
rewritten after the compare register (CR20) and TM2 match, the output level at this time will be the inactive level until
TM2 overflows and becomes 0, and will then return to normal PPG output.
If CR21 is rewritten before CR20 and TM2 match, the active level will be output until CR20 and TM2 match. If CR20
and TM2 match before TM2 overflows and becomes 0, the inactive level is output at that point. When TM2 overflows
and becomes 0, the active level will be output, and normal PPG output will be restored.
CR21 rewriting should be performed by the interrupt due to a match between TM2 and CR21, etc.
TM2
Count Value
CR20
CR21
TO2
0H
n1
Figure 10-33 Example of Extended PPG Output Cycle
When value n2 smaller than the TM2
value n5 is written to CR21 here, the
PPG cycle is extended.
n3
n1
CHAPTER 10 TIMER/COUNTER 2
n3
n1
n2
n5
n3
TO2 becomes inactive level when
CR20 and TM2 match, otherwise
it remains at the active level.
n1
Full Count Value
n4
n2
n4
n2
313

Related parts for UPD784026