CHAPTER 6 16-BIT TIMER/EVENT COUNTERS 00 AND 01
User’s Manual U16899EJ2V0UD
165
Figure 6-28. Timing of Pulse Width Measurement Operation with Free-Running Counter
and Two Capture Registers (with Rising Edge Specified)
t
0000H
0000H
FFFFH
0001H
D0
D0
INTTM01n
OVF0n
D2
D1
D3
D2
D3
D0 + 1
D2 + 1
D1
D1 + 1
CR00n capture value
Count clock
TM0n count value
TI00n pin input
CR01n capture value
(D1
−
D0)
×
t
(D3
−
D2)
×
t
(10000H
−
D1 + D2)
×
t
Note
Note Clear OVF0n by software.
(4) Pulse width measurement by means of restart
When input of a valid edge to the TI00n pin is detected, the count value of 16-bit timer counter 0n (TM0n) is taken
into 16-bit timer capture/compare register 01n (CR01n), and then the pulse width of the signal input to the TI00n
pin is measured by clearing TM0n and restarting the count operation.
Either of two edges
rising or falling
can be selected using bits 4 and 5 (ES0n0 and ES0n1) of prescaler mode
register 0n (PRM0n).
Sampling is performed using the count clock cycle selected by prescaler mode register 0n (PRM0n) and a
capture operation is only performed when a valid level of the TI00n pin is detected twice, thus eliminating noise
with a short pulse width.
Remark n = 0:
µ
PD78F0132H
n = 0, 1:
µ
PD78F0133H, 78F0134H, 78F0136H, 78F0138H, 78F0138HD