116
CHAPTER 6 16-BIT TIMER/EVENT COUNTER 0
Preliminary User’s Manual U16035EJ1V0UM
6.4.2 PPG output operations
Setting the 16-bit timer mode control register 0 (TMC0) and capture/compare control register 0 (CRC0) as shown
in Figure 6-10 allows operation as PPG (Programmable Pulse Generator) output.
In the PPG output operation, square waves are output from the TO0/TI00/P70 pin with the pulse width and the
cycle that correspond to the count values set beforehand in 16-bit timer capture/compare register 01 (CR01) and in
16-bit timer capture/compare register 00 (CR00), respectively.
Figure 6-10. Control Register Settings for PPG Output Operation
(a) 16-bit timer mode control register 0 (TMC0)
0
0
0
0
TMC03
1
TMC02
1
TMC01
0
OVF0
0
TMC0
Clears and starts on match between TM0 and CR00
(b) Capture/compare control register 0 (CRC0)
0
0
0
0
0
CRC02
0
CRC01
×
CRC00
0
CRC0
CR00 as compare register
CR01 as compare register
(c) 16-bit timer output control register 0 (TOC0)
0
0
0
TOC04
1
LVS0
0/1
LVR0
0/1
TOC01
1
TOE0
1
TOC0
Enables TO0 output
Reverses output on match between TM0 and CR00
Specifies initial value of TO0 output F/F
Reverses output on match between TM0 and CR01
Cautions 1. Values in the following range should be set in CR00 and CR01:
0000H < CR01 < CR00
≤
FFFFH
2. The cycle of the pulse generated through PPG output (CR00 setting value + 1) has a duty of
(CR01 setting value + 1)/(CR00 setting value + 1).
Remark
×
: don’t care