170
CHAPTER 8 16-BIT TIMER/EVENT COUNTER
User’s Manual U12697EJ3V0UM
Figure 8-19. Timing of Pulse Width Measurement by Restarting (with Rising Edge Specified)
t
D1
×
t
D2
×
t
Count clock
0000
0001
D0
D1
0000 0001
D2
0001
TM0 count value
D0
D2
TI00 pin input
Value loaded to
CR01
Value loaded to
CR00
D1
INTTM01
0000
Caution For simplication purposes, delay due to noise elimination is not taken into consideration in the
capture operation by TI00 pin input and in the interrupt request generation timing in the above
figure. For a more accurate picture, refer to Figure 8-14 CR01 Capture Operation with Rising Edge
Specified.
8.4.4 Operation as external event counter
The 16-bit timer/event counter can be used as an external event counter which counts the number of clock pulses
input to the TI00/P35 pin from an external source by using 16-bit timer counter 0 (TM0).
Each time the valid edge specified by prescaler mode register 0 (PRM0) has been input to the TI00/P35 pin, TM0
is incremented.
To perform a count operation using the TI01/P35 pin input clock, specify the TI00 valid with bits 0 and 1 of PRM0
(PRM00, PRM01).
Set any value other than 0000H in CR00 (single pulse count can not be operated.)
The edge of the TI00/P35 pin is specified by bits 4 and 5 (ES00 and ES01) of prescaler mode register 0 (PRM0).
The rising, falling, or both the rising and falling edges can be specified.
When using the TI00 pin input as the count clock, sampling for valid edge detection is locked by the main system
clock (f
XX
) and the capture operation is not performed until the valid level is detected two times. Therefore, noise
with a short pulse width can be rejected.