
349
Chapter 8
16-Bit Timer/Event Counter Q
User’s Manual U16702EE3V2UD00
8.5.8 Pulse width measurement mode (TQnMD2 to TQnMD0 = 110)
In the pulse width measurement mode, free-running counting is performed. The value of the 16-bit
counter is captured to capture register m (TQnCCRm) when both the rising and falling edges of the
TIQnm pin are detected, and the 16-bit counter is cleared to 0000H. In this way, the external input pulse
width can be measured.
To measure a long pulse width that exceeds the overflow of the 16-bit counter, use the overflow flag for
detection. A pulse width that causes overflow to occur twice or more cannot be measured. Adjust the
operating frequency of the 16-bit counter.
Caution:
In the pulse width measurement mode, select the internal clock (TQnEEE of
TQnCTL1 register = 0) as a count clock.
Figure 8-30:
Flowchart of Basic Operation in Pulse Width Measurement Mode
Caution:
An external pulse can be input from any of TIQn0 to TIQn3 but only one of them can
be used. Specify that both the rising and falling edges are detected. Specify that the
input edge of an external pulse input that is not used is not detected.
Remark:
n = 0 to 1, m = 0 to 3
START
Set edge detection of TIQnm
Note
.
(TQnIS3 to TQnIS0)
Input rising edge of pulse to TIQnm.
Capture value to TQnCCRm.
Clear and start 16-bit counter.
Input falling edge of pulse to TIQnm.
Capture value to TQnCCRm.
Clear and start 16-bit counter.
Enable timer operation (TQnCE = 1).
Initial setting
•
Select clock.
(TQnCTL0: TQnCKS2 to TQnCKS0)
•
Set pulse width measurement mode.
(TQnCTL1: TQnMD2 to TQnMD0 = 110)
•
Set compare register.
(TQnOPT0: TQnCCS3 to TQnCCS0)
electronic components distributor
Содержание V850E/RS1
Страница 6: ...6 User s Manual U16702EE3V2UD00 Downloaded from Elcodis com electronic components distributor...
Страница 206: ...206 User s Manual U16702EE3V2UD00 MEMO Downloaded from Elcodis com electronic components distributor...
Страница 232: ...232 User s Manual U16702EE3V2UD00 MEMO Downloaded from Elcodis com electronic components distributor...
Страница 366: ...366 User s Manual U16702EE3V2UD00 MEMO Downloaded from Elcodis com electronic components distributor...
Страница 402: ...402 User s Manual U16702EE3V2UD00 MEMO Downloaded from Elcodis com electronic components distributor...
Страница 684: ...684 User s Manual U16702EE3V2UD00 MEMO Downloaded from Elcodis com electronic components distributor...
Страница 766: ...766 User s Manual U16702EE3V2UD00 MEMO Downloaded from Elcodis com electronic components distributor...
Страница 798: ...798 User s Manual U16702EE3V2UD00 MEMO Downloaded from Elcodis com electronic components distributor...
Страница 832: ...832 User s Manual U16702EE3V2UD00 MEMO Downloaded from Elcodis com electronic components distributor...
Страница 834: ...834 User s Manual U16702EE3V2UD00 MEMO Downloaded from Elcodis com electronic components distributor...
Страница 848: ...848 User s Manual U16702EE3V2UD00 Downloaded from Elcodis com electronic components distributor...
Страница 852: ...Downloaded from Elcodis com electronic components distributor...