NEC V850ES/F 3-L Series User Manual page 359

32-bit single-chip microcontroller
Table of Contents

Advertisement

16-Bit Timer/Event Counter AA
(2)
Figure 10-30
Note
Alternating pulse width and pulse space measurement
The pulse period of a signal can be measured in the pulse width measurement
mode alternating in one capture register, when the edge detection of one of the
inputs TIAAn0 and TIAAn1 is set to "both rising and falling edges". The
detection of the other input should be set to "no edge detection".
By detection of a falling or rising edge the resulting value is captured in the
corresponding capture register (TAAnCCR0 or TAAnCCR1), and the timer is
cleared and restarts counting.
Flowchart of Alternating Pulse Width and Pulse Space Measurement
1.
External pulse input is possible for both TIAAn0 and TIAAn1, but only one
should be selected for the alternating pulse width and pulse space
measurement.
Specify "both rising and the falling edges" for edge detection. Specify the
edge of the external input pulse that is not used as "no edge detection".
2.
m = 0, 1
User's Manual U18743EE1V2UM00
START
Initial settings
• Clock selection
(TAAnCTL0: TAAnCKS2 to TAAnCKS0)
• Pulse width measurement mode setting
(TAAnCTL1: TAAnMD2 to TAAnMD0 =
110B)
• Capture register setting
(TAAnCCR0, TAAnCCR1)
TIAAn1/TIAAn0 edge detection setting
(TAAnIS3 to TAAnIS0)
Timer operation enable (TAAnCE = 1)
Rising edge input to TIAAnm, capture of
value to TAAnCCRm, 16-bit counter
clear & start
Falling edge input to TIAAnm, capture of
value to TAAnCCRm, 16-bit counter
clear & start
Chapter 10
Note 1
359

Advertisement

Table of Contents
loading

Table of Contents