Pulse Width Measurement Operation - NEC mPD78F0730 Preliminary User's Manual

8-bit single-chip microcontroller
Table of Contents

Advertisement

6.4.8 Pulse width measurement operation

TM00 can be used to measure the pulse width of the signal input to the TI000 and TI010 pins.
Measurement can be accomplished by operating the 16-bit timer/event counter 00 in the free-running timer mode
or by restarting the timer in synchronization with the signal input to the TI000 pin.
When an interrupt is generated, read the value of the valid capture register and measure the pulse width. Check
bit 0 (OVF00) of 16-bit timer mode control register 00 (TMC00). If it is set (to 1), clear it to 0 by software.
Figure 6-46. Block Diagram of Pulse Width Measurement (Free-Running Timer Mode)
TI000 pin
TI010 pin
Figure 6-47. Block Diagram of Pulse Width Measurement
TI000 pin
TI010 pin
A pulse width can be measured in the following three ways.
• Measuring the pulse width by using two input signals of the TI000 and TI010 pins (free-running timer mode)
• Measuring the pulse width by using one input signal of the TI000 pin (free-running timer mode)
• Measuring the pulse width by using one input signal of the TI000 pin (clear & start mode entered by the TI000 pin
valid edge input)
Remarks 1. For the setting of the I/O pins, see 6.3 (6) Port mode register 0 (PM0).
2. For how to enable the INTTM000 signal interrupt, see CHAPTER 13 INTERRUPT FUNCTIONS.
164
Downloaded from
Elcodis.com
electronic components distributor
CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00
Operable bits
TMC003, TMC002
Count clock
Capture signal
Edge
detection
Capture
Edge
detection
signal
(Clear & Start Mode Entered by TI000 Pin Valid Edge Input)
Operable bits
TMC003, TMC002
Count clock
Capture signal
Edge
detection
Capture
Edge
detection
signal
Preliminary User's Manual U19014EJ1V0UD
Timer counter
(TM00)
Capture register
(CR010)
Capture register
(CR000)
Clear
Timer counter
(TM00)
Capture register
(CR010)
Capture register
(CR000)
Interrupt signal
(INTTM010)
Interrupt signal
(INTTM000)
Interrupt signal
(INTTM010)
Interrupt signal
(INTTM000)

Advertisement

Table of Contents
loading

Table of Contents