121
CHAPTER 6 16-BIT TIMER/EVENT COUNTER
Preliminary User’s Manual U13420EJ2V0UM00
(3) Pulse width measurement with free-running counter and two capture registers
When 16-bit timer/counter 0 (TM0) is operated in free-running mode (see register settings in Figure 6-17), it is
possible to measure the pulse width of the signal input to the TI00//TO0/P20 pin.
When the edge specified by bits 4 and 5 (ES00 and ES01) of prescaler mode register 0 (PRM0) is input to the
TI00/TO0/P20 pin, the value of TM0 is taken into 16-bit timer capture/compare register 01 (CR01) and an external
interrupt request signal (INTTM01) is set.
Also, on the inverse edge input of that of the capture operation into CR01, the value of TM0 is taken into 16-
bit timer capture/compare register 00 (CR00).
Either of two edges can be selected—rising or falling—as the valid edges for the TI00/TO0/P20 pin specified
by means of bits 4 and 5 (ES00 and ES01) of prescaler mode register 0 (PRM0).
For TI00/TO0/P20 pin valid edge detection, sampling is performed at the interval selected by means of the
prescaler mode register (PRM0), and a capture operation is only performed when a valid level is detected twice,
thus eliminating noise with a short pulse width.
Caution
If the valid edge of TI00/TO0/P20 is specified to be both rising and falling edge,
capture/compare register 00 (CR00) cannot perform the capture operation.
Figure 6-17. Control Register Settings for Pulse Width Measurement with Free-Running Counter and
Two Capture Registers
(a) 16-bit timer mode control register 0 (TMC0)
(b) Capture/compare control register 0 (CRC0)
Remark
0/1: Setting 0 or 1 allows another function to be used simultaneously with pulse width measurement.
See the description of the respective control registers for details.
0
0
0
0
TMC03
0
TMC02
1
TMC01
0/1
OVF0
0
TMC0
Free running mode
0
0
0
0
0
CRC02
1
CRC01
1
CRC00
1
CRC0
CR00 as capture register
Captures to CR00 at edge reverse
to valid edge of TI00/TO0/P20.
CR01 as capture register
Содержание mPD780065 Series
Страница 2: ...Preliminary User s Manual U13420EJ2V0UM00 2 MEMO ...
Страница 10: ...10 Preliminary User s Manual U13420EJ2V0UM00 MEMO ...
Страница 22: ...22 Preliminary User s Manual U13420EJ2V0UM00 MEMO ...
Страница 134: ...134 Preliminary User s Manual U13420EJ2V0UM00 MEMO ...
Страница 154: ...154 Preliminary User s Manual U13420EJ2V0UM00 MEMO ...
Страница 160: ...160 Preliminary User s Manual U13420EJ2V0UM00 MEMO ...
Страница 186: ...186 Preliminary User s Manual U13420EJ2V0UM00 MEMO ...
Страница 326: ...326 Preliminary User s Manual U13420EJ2V0UM00 MEMO ...
Страница 342: ...342 Preliminary User s Manual U13420EJ2V0UM00 MEMO ...
Страница 350: ...350 Preliminary User s Manual U13420EJ2V0UM00 MEMO ...