User’s Manual U11969EJ3V0UM00
201
CHAPTER 7 TIMER/COUNTER FUNCTION (REAL-TIME PULSE UNIT)
(4) Frequency measurement (timer 0, timer 1, and timer 3)
Timer 0, timer 1, and timer 3 can be used to measure the cycle or frequency of an external pulse input to the
INTP pin.
Shown below is an example where the frequency of the external pulse input to the INTP00 pin is measured
with an accuracy of 24 bits, by combining the use of timer 0 and the capture/compare register CC00.
The valid edge of the INTP00 input signal is specified by the INTM1 register to be the rising edge.
To calculate the frequency, the difference between the count value of TM0 captured to the CC00 register at
the nth rising edge (Dn), and the count value captured at the (n – 1)th rising edge (Dn – 1), is calculated, and
the value multiplied by the count clock frequency.
The frequency measurement exceeding the maximum count value of TM0 is performed by counting the number
of overflow with the INTOV0 overflow interrupt request.
Figure 7-30. Example of Frequency Measurement Timing
Remark D0 to D2 : count value of TM0
FFFFFFH
FFFFFFH
FFFFFFH
TM0 count value
0
External interrupt request
(INTP00)
Interrupt request
(INTOV0)
Capture/compare register
(CC00)
D0
D1
D2
t1
t2
D2
D1
D0
t1 = {(1000000H – D0) + D1} x count clock cycle frequency
t2 = {(1000000H – D1) + D2} x count clock cycle frequency
Summary of Contents for V854 UPD703006
Page 2: ...2 User s Manual U11969EJ3V0UM00 MEMO ...
Page 22: ...22 User s Manual U11969EJ3V0UM00 MEMO ...
Page 80: ...80 User s Manual U11969EJ3V0UM00 MEMO ...
Page 134: ...134 User s Manual U11969EJ3V0UM00 MEMO ...
Page 156: ...156 User s Manual U11969EJ3V0UM00 MEMO ...
Page 294: ...294 User s Manual U11969EJ3V0UM00 MEMO ...
Page 320: ...320 User s Manual U11969EJ3V0UM00 MEMO ...
Page 324: ...324 User s Manual U11969EJ3V0UM00 MEMO ...
Page 336: ...336 User s Manual U11969EJ3V0UM00 MEMO ...
Page 376: ...376 User s Manual U11969EJ3V0UM00 MEMO ...
Page 382: ...382 User s Manual U11969EJ3V0UM00 MEMO ...
Page 394: ...394 User s Manual U11969EJ3V0UM00 MEMO ...