CHAPTER 7 TIMER/COUNTER FUNCTION
166
Figure 7-18. Timing of Pulse Width Measurement with Free Running Counter and
Two Capture Registers (with rising edge specified)
D0
D2
D3
D2
0000H
FFFFH
D1
D0
0001H
0000H
t
D0+1
D1+1
(10000H
−
D1 + D2)
×
t
(D3
−
D2)
×
t
(D1
−
D0)
×
t
OVFn
Count clock
TMn count
value
TIn0 pin input
INTTMn1
Value loaded to
CRn1
Value loaded to
CRn0
D2+1
D1
D3
Remark
n = 0, 1
(4) Pulse width measurement by restarting
When the valid edge of the TIn0 pin is detected, the pulse width of the signal input to the TIn0 pin can be
measured by clearing the 16-bit timer register n (TMn) once and then resuming counting after loading the count
value of TMn to the 16-bit capture/compare register n1 (CRn1).
The edge is specified by bits 4 and 5 (ESn00 and ESn01) of prescaler mode register n (PRMn). The rising or
falling edge can be specified.
The valid edge is detected through sampling at a count clock cycle selected by the PRMn, 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.
Caution
If the valid edge of the TIn0 pin is specified to be both the rising and falling edges, the
capture/compare register n0 (CRn0) cannot perform its capture operation.
Summary of Contents for V850/SA1 mPD703015
Page 2: ...2 MEMO ...
Page 100: ...100 MEMO ...
Page 144: ...144 MEMO ...
Page 200: ...200 MEMO ...
Page 328: ...328 MEMO ...
Page 356: ...356 MEMO ...
Page 358: ...358 MEMO ...
Page 368: ...368 MEMO ...
Page 374: ...374 MEMO ...
Page 382: ...382 MEMO ...