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.
Содержание V850/SA1 mPD703015
Страница 2: ...2 MEMO ...
Страница 100: ...100 MEMO ...
Страница 144: ...144 MEMO ...
Страница 200: ...200 MEMO ...
Страница 328: ...328 MEMO ...
Страница 356: ...356 MEMO ...
Страница 358: ...358 MEMO ...
Страница 368: ...368 MEMO ...
Страница 374: ...374 MEMO ...
Страница 382: ...382 MEMO ...