Pulse Width Measurement Operation - NEC 78K0 Series User Manual

8-bit single-chip microcontrollers
Hide thumbs Also See for 78K0 Series:
Table of Contents

Advertisement

7.4.8 Pulse width measurement operation

TM0n can be used to measure the pulse width of the signal input to the TI00n and TI01n pins.
Measurement can be accomplished by operating the 16-bit timer/event counter 0n in the free-running timer mode
or by restarting the timer in synchronization with the signal input to the TI00n pin.
When an interrupt is generated, read the value of the valid capture register and measure the pulse width. Check
bit 0 (OVF0n) of 16-bit timer mode control register 0n (TMC0n). If it is set (to 1), clear it to 0 by software.
Figure 7-51. Block Diagram of Pulse Width Measurement (Free-Running Timer Mode)
Count clock
Edge
TI00n pin
detection
Edge
TI01n pin
detection
µ
Remark n = 0:
PD78F0531, 78F0532, 78F0533
µ
n = 0, 1:
PD78F0534, 78F0535, 78F0536, 78F0537, 78F0537D
Figure 7-52. Block Diagram of Pulse Width Measurement
Count clock
Edge
TI00n pin
detection
Edge
TI01n pin
detection
µ
Remark n = 0:
PD78F0531, 78F0532, 78F0533
µ
n = 0, 1:
PD78F0534, 78F0535, 78F0536, 78F0537, 78F0537D
230
CHAPTER 7 16-BIT TIMER/EVENT COUNTERS 00 AND 01
Operable bits
TMC0n3, TMC0n2
Capture signal
Capture
signal
(Clear & Start Mode Entered by TI00n Pin Valid Edge Input)
Operable bits
TMC0n3, TMC0n2
Capture signal
Capture
signal
Preliminary User's Manual U17260EJ3V1UD
Timer counter
(TM0n)
Capture register
(CR01n)
Capture register
(CR00n)
Clear
Timer counter
(TM0n)
Capture register
(CR01n)
Capture register
(CR00n)
Interrupt signal
(INTTM01n)
Interrupt signal
(INTTM00n)
Interrupt signal
(INTTM01n)
Interrupt signal
(INTTM00n)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents