![NEC V854 UPD703006 Скачать руководство пользователя страница 196](http://html.mh-extra.com/html/nec/v854-upd703006/v854-upd703006_user-manual_249287196.webp)
196
User’s Manual U11969EJ3V0UM00
CHAPTER 7 TIMER/COUNTER FUNCTION (REAL-TIME PULSE UNIT)
(2) Pulse width measurement (timer 0, timer 1, and timer 3)
An example of pulse width measurement is shown below.
In this example, the width of the high or low level of an external pulse input to the INTP00 pin is measured.
The value of timer 1 (TM0) is captured to a capture/compare register (CC00) in synchronization with the valid
edge of the INTP00 pin (both the rising and falling edges) and is pended, as shown in Figure 7-24.
To calculate the pulse width, the difference between the count value of TM0 captured to the CC00 register
on detection of the nth valid edge (Dn), and the count value on detection of the (n – 1)th valid edge
(Dn – 1) is calculated. This difference is multiplied by the count clock.
Figure 7-24. Pulse Width Measurement Timing (timer 0)
Remark D0 to D3: count value of TM0
FFFFFFH
D0
D1
D3
D2
TM0 count value
0
External pulse input
(INTP00)
Capture/compare register
(CC00)
Interrupt request
(INTOV0)
Interrupt request
(INTCC00)
Capture
Capture
Capture
Capture
D3
D2
D1
D0
t1
t2
t3
t1 = (D1 – D0) x count clock cycle
t2 = {(1000000H – D1) + D2} x count clock cycle
t3 = (D3 – D2) x count clock cycle
Содержание V854 UPD703006
Страница 2: ...2 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 22: ...22 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 80: ...80 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 134: ...134 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 156: ...156 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 294: ...294 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 320: ...320 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 324: ...324 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 336: ...336 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 376: ...376 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 382: ...382 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 394: ...394 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 396: ...396 User s Manual U11969EJ3V0UM00 MEMO ...