Figure 9-33: Flowchart Of Pulse Period Measurement - NEC V850E/PH2 User Manual

32-bit single-chip microcontroller
Table of Contents

Advertisement

(1)
Pulse period measurement
The pulse period of a signal can be measured in the pulse width measurement mode, when the
edge detection of one of the inputs TIPn0 and TIPn1 is set either to "rising edge" or "falling edge".
The detection of the other input should be set to "no edge detection".
By detection of the specified edge the resulting value is captured in the corresponding capture
register (TPnCCR0 or TPnCCR1), and the timer is cleared and restarts counting.
Note: External pulse input is possible for both TIPn0 and TIPn1, but only one should be selected for
the pulse period measurement.
Specify either "rising edge" or "falling edge" for edge detection. Specify the edge of the external
input pulse that is not used as "no edge detection".
Remark:
n = 0 to 7
m = 0, 1
Chapter 9 16-Bit Timer/Event Counter P

Figure 9-33: Flowchart of Pulse Period Measurement

• Clock selection
(TPnCTL0: TPnCKS2 to TPnCKS0)
• Pulse width measurement mode setting
(TPnCTL1: TPnMD2 to TPnMD0 =
110B)
• Capture register setting
(TPnCCR0, TPnCCR1)
TIPn1/TIPn0 edge detection setting
(TPnIS3 to TPnIS0)
Timer operation enable (TPnCE = 1)
Specified edge input to TIPnm (rising or
falling edge), capture of value to
TPnCCRm, 16-bit counter clear & start
User's Manual U16580EE3V1UD00
START
Initial settings
Note
305

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mupd70f3187

Table of Contents