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
Summary of Contents for V850E/MS1 UPD703100
Page 2: ...User s Manual U12688EJ4V0UM00 2 MEMO ...
Page 6: ...User s Manual U12688EJ4V0UM00 6 MEMO ...
Page 8: ...User s Manual U12688EJ4V0UM00 8 MEMO ...
Page 12: ...User s Manual U12688EJ4V0UM00 12 MEMO ...
Page 26: ...User s Manual U12688EJ4V0UM00 26 MEMO ...
Page 68: ...User s Manual U12688EJ4V0UM00 68 MEMO ...
Page 124: ...User s Manual U12688EJ4V0UM00 124 MEMO ...
Page 198: ...User s Manual U12688EJ4V0UM00 198 MEMO ...
Page 230: ...User s Manual U12688EJ4V0UM00 230 MEMO ...