Pulse Width Measurement Operations - NEC 78014Y Series User Manual

8-bit single-chip microcontrollers
Table of Contents

Advertisement

8.5.3 Pulse width measurement operations

The pulse width of the signal to be input to theINTP0/P00/TI0 pin can be neasured with the 16-bit timer register
(TM0).
There are two measurement methods: measuring with TM0 used in free-running mode, and measuring by restarting
the timer in synchronization with the valid edge of the signal input to the INTP0/P00/TI0 pin.
(1) Pulse width measurement with free-running
When the 16-bit timer register (TM0) is operated, the edge specified by external interrupt mode register (INTM0)
is input, the value of TM0 is taken into 16-bit capture register (CR01) and an external interrupt request signal
(INTP0) is set.
Any of three edge specifications can be selected - rising, falling, or both edges - by means of bits 2 and 3 (ES10
and ES11) of the external interrupt mode register (INTM0).
For valid edge detection, sampling is performed at the interval selected by means of the sampling clock select
register (SCS), and a capture operation is only performed when a valid level is detected twice, thus eliminating
noise with a short pulse width.
Figure 8-14. Configuration Diagram for Pulse Width Measurement by Free-Running Counter
www.DataSheet4U.com
TI0/P00/INTP0
190
CHAPTER 8 16-BIT TIMER/EVENT COUNTER
f
/2
X
f
/2
2
X
f
/2
3
X
16-Bit Timer Register (TM0)
16-Bit Capture Register (CR01)
Internal Bus
OVF0
INTP0

Advertisement

Table of Contents
loading

Table of Contents