172
CHAPTER 8 16-BIT TIMER/EVENT COUNTER
User’s Manual U12697EJ3V0UM
Figure 8-22. Timing of External Event Counter Operation (with Rising Edge Specified)
TI00 pin input
0000
0001
0003
0005
N – 1
0001
0003
TM0 count value
N
CR00
INTTM00
0002
0004
0000
0002
N
Caution Read TM0 when reading the count value of the external event counter.
8.4.5 Operation to output square wave
The 16-bit timer/event counter operates as the square wave output for the user-defined frequency that is used
as the interval for the count value previously set in 16-bit capture/compare register 00 (CR00).
By setting bits 0 (TOE0) and 1 (TOC01) of 16-bit timer output control register 0 (TOC0) to 1, the output status of
the TO0/P30 pin is inverted at an interval specified by the count value set in advance to CR00. In this way, a square
wave of any frequency can be output.