189
Chapter 7 Timer/Counter Units
7
2. If the current value of the CR21 compare register is decreased below the value of 8-bit timer 2 (TM2), the PPG period becomes
as long as the full-count time of TM2. At this time, if CR21 is rewritten after the value of the CR20 compare register coincides
with the value of TM2, the inactive level is output until TM2 overflows to 0, then normal PPG output is resumed. If CR21 is
rewritten before the value of CR20 coincides with the value of TM2, the active level is output until the value of CR20 coincides
with the value of TM2. When the value of CR20 coincides with the value of TM2 before TM2 overflows to 0, the inactive level
is output at that time. When TM2 overflows to 0, the active level is output, and normal PPG output is resumed. Rewrite CR21,
if required, by using an interrupt generated by a coincidence between TM2 and CR21.
Fig. 7-95 Example of PPG Output Period Made Longer
n3
n1
n2
n4
n2
0H
CR20
CR21
TO2
n1
n3
n1
n4
n2
Full count value
n3
n5
TM2
count value
The PPG period is extended when a value,
n2 less than TM2 value, n5 is written to
CR21 here.
TO2 becomes inactive when CR20 coincides with TM2;
otherwise, TO2 remains active.
Remark
ALV2 = 1
3. If the PPG period is too short for interrupt acceptance, the measures described in Cautions 1 and 2 above do not lead to solution.
Consider other measures (such as masking all interrupts and polling interrupt request flags by software).
4. If timer output is disabled (ENTOn = 0: n = 2, 3), the output level on the TOn (n = 2, 3) is the inverted value of the value set in
ALVn (n = 2, 3). Accordingly, note that if timer output is disabled when the PPG output function is selected, the active level is
output.
Summary of Contents for PD78212
Page 11: ......
Page 53: ...24 ...
Page 61: ...32 µPD78214 Sub Series 9 VSS Ground 10 NC non connection Not connected inside the chip ...
Page 65: ...36 ...
Page 83: ...54 ...
Page 135: ...106 ...
Page 271: ...242 ...
Page 405: ...376 ...
Page 417: ...388 ...
Page 423: ...394 ...
Page 449: ...420 ...
Page 457: ...428 ...
Page 471: ...442 ...
Page 487: ...458 ...