CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00
Preliminary User’s Manual U16315EJ1V0UD
142
Figure 6-11. Configuration of PPG Output
16-bit timer capture/compare
register 000 (CR000)
16-bit timer counter 00
(TM00)
Clear
circuit
Noise
eliminator
f
X
f
X
f
X
/2
2
f
X
/2
8
TI000/P00
16-bit timer capture/compare
register 010 (CR010)
TO00/TI010/P01
Selector
Output controller
Figure 6-12. PPG Output Operation Timing
t
0000H
0000H 0001H
0001H
M – 1
Count clock
TM00 count value
TO00
Pulse width: (M + 1)
×
t
1 cycle: (N + 1)
×
t
N
CR000 capture value
CR010 capture value
M
M
N – 1
N
Clear
Count start
Caution
CR000 cannot be rewritten during TM00 operation.
Remarks 1.
0000H < M < N
≤
FFFFH
2.
In the PPG output operation, change the pulse width (rewrite CR010) during TM00 operation using
the following procedure.
<1> Disable the timer output inversion operation by match of TM00 and CR010 (TOC004 = 0)
<2> Disable the INTTM010 interrupt (TMMK010 = 1)
<3> Rewrite CR010
<4> Wait for 1 cycle of the TM00 count clock
<5> Enable the timer output inversion operation by match of TM00 and CR010 (TOC004 = 1)
<6> Clear the interrupt request flag of INTTM010 (TMIF010 = 0)
<7> Enable the INTTM010 interrupt (TMMK010 = 0)