16-Bit Timer 0 Tm0 Operations; Pulse Width Measurement Operations - NEC mPD780852 Series Preliminary User's Manual

8-bit single-chip microcontrollers
Table of Contents

Advertisement

6.5 16-Bit Timer 0 TM0 Operations

6.5.1 Pulse width measurement operations

It is possible to measure the pulse width of the signals input to the TI00/P40 to TI02/P42 pins using the
16-bit timer register (TM0). TM0 is used in free-running mode.
(1) Pulse width measurement with free-running counter and one capture register (TI00)
When the edge specified by prescaler mode register (PRM0) is input to the TI00/P40 pin, the value of TM0 is
taken into 16-bit capture register 00 (CR00) and an external interrupt request signal (INTTM00) is set.
Any of three edge specifications can be selected—rising, falling, or both edges—by means of bits 2 and 3 (ES00
and ES01) of prescaler mode register (PRM0).
For TI00 pin valid edge detection, sampling is performed at the count clock selected by PRM0, and a capture
operation is only performed when a valid level is detected twice, thus eliminating noise with a short pulse width.
Figure 6-6. Configuration Diagram for Pulse Width Measurement by Free-Running Counter
3
f
/2
X
4
f
/2
X
5
f
/2
X
6
f
/2
X
TI00
Figure 6-7.
Pulse Width Measurement Operation Timing by Free-Running Counter
and One Capture Register (with Both Edges Specified)
t
Count clock
TM0 count
0000H 0001H
value
TI00 pin
input
Value loaded
to CR00
INTTM00
INTOVF
108
CHAPTER 6 16-BIT TIMER 0 TM0
16-bit timer register (TM0)
16-bit capture register 00 (CR00)
Internal bus
D0
D1
D0
D1
(D1 – D0) × t
(10000H – D1 + D2) × t
Preliminary User's Manual U14581EJ3V0UM00
INTOVF
INTTM00
FFFFH 0000H
D2
D2
(D3 – D2) × t
D3
D3

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mpd780851Mpd780851aMpd780852aMpd78f0852

Table of Contents