CHAPTER 7 TIMER/COUNTER FUNCTION
User’s Manual U13850EJ4V0UM
196
Figure 7-21. Control Register Settings for Pulse Width Measurement by Restarting
(a) 16-bit timer mode control registers 0, 1 (TMC0, TMC1)
TMCn3
TMCn2
TMCn1
OVFn
TMCn
0
0
0
0
1
0
0/1
0
Clears and starts at
valid edge of TIn0 pin.
(b) Capture/compare control registers 0, 1 (CRC0, CRC1)
CRCn2
CRCn1
CRCn0
CRCn
0
0
0
0
0
1
1
1
CRn0 as capture
register
Captures to CRn0 at
edge reverse to valid
edge of TIn0.
CRn1 as capture
register
Remark
0/1: When these bits are reset to 0 or set to 1, other functions can be used along with the pulse
width measurement function. For details, refer to
7.1.4 Timer 0, 1 control registers
.
Figure 7-22. Timing of Pulse Width Measurement by Restarting (with Rising Edge Specified)
t
(D1 + 1)
×
t
(D2 + 1)
×
t
0001H
0000H
D0
D2
D1
Count clock
TMn count
value
TIn0 pin input
INTTMn1
D0
D2
Value loaded to
CRn1
Value loaded to
CRn0
D1
0001H
0000H
0001H
0000H
Remark
n = 0, 1