CHAPTER 9 TIMER/COUNTER FUNCTION (REAL-TIME PULSE UNIT)
User’s Manual U12688EJ4V0UM00
275
(2) Operation for pulse width measurement (Timer 1)
In measuring the pulse width, timer 1 is used.
Here, an example is given of measurement of high level or low level width of an external pulse input to the
INTP112 pin.
As shown in Figure 9-13, in synch with the active edge (specified as both the rising edge and falling edge) of
the INTP112 pin’s input, the value of the counting timer 1 (TM11) is fetched to and held in the
capture/compare register (CC112).
The pulse width is calculated by determining the difference between the count value of TM11 captured in the
CC112 register through active edge detection the nth time and the count value (Dn – 1) captured through
active edge detection the (n – 1)th time, then multiplying this value by the count clock.
Figure 9-13. Example of Pulse Measurement Timing
FFFFH
D0
D1
D2
D3
Capture
Capture
Capture
Capture
D0
D1
D2
D3
t1
t2
t3
TM11 count value
External pulse input
(INTP112)
0
Capture/compare register
(CC112)
t1 = (D1 – D0)
×
count clock cycle
t2 = {(10000H – D1) + D2}
×
count clock cycle
t3 = (D3 – D2)
×
count clock cycle
Remark
D0 to D3: TM11 count values
Содержание V850E/MS1 UPD703100
Страница 2: ...User s Manual U12688EJ4V0UM00 2 MEMO ...
Страница 6: ...User s Manual U12688EJ4V0UM00 6 MEMO ...
Страница 8: ...User s Manual U12688EJ4V0UM00 8 MEMO ...
Страница 12: ...User s Manual U12688EJ4V0UM00 12 MEMO ...
Страница 26: ...User s Manual U12688EJ4V0UM00 26 MEMO ...
Страница 68: ...User s Manual U12688EJ4V0UM00 68 MEMO ...
Страница 124: ...User s Manual U12688EJ4V0UM00 124 MEMO ...
Страница 198: ...User s Manual U12688EJ4V0UM00 198 MEMO ...
Страница 230: ...User s Manual U12688EJ4V0UM00 230 MEMO ...
Страница 422: ...User s Manual U12688EJ4V0UM00 422 MEMO ...