119
CHAPTER 6 16-BIT TIMER/EVENT COUNTER
Preliminary User’s Manual U13420EJ2V0UM00
(2) Measurement of two pulse widths with free-running counter
When 16-bit timer/counter 0 (TM0) is operated in free-running mode (see register settings in Figure 6-14), it is
possible to simultaneously measure the pulse widths of the two signals input to the TI00/TO0/P20 pin and the
TI01/P21 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 capture/compare register 01 (CR01) and an external
interrupt request signal (INTTM01) is set.
Also, when the edge specified by bits 6 and 7 (ES10 and ES11) of PRM0 is input to the TI01/P21 pin, the value
of TM0 is taken into 16-bit capture/compare register 00 (CR00) and an external interrupt request signal (INTTM00)
is set.
Any of three edges can be selected—rising, falling, or both edges—as the valid edges for the TI00/TO0/P20 pin
and the TI01/P21 pin specified by means of bits 4 and 5 (ES00 and ES01) and bits 6 and 7 (ES10 and ES11)
of INTM0, respectively.
For TI00/TO0/P20 pin valid edges detection, sampling is performed at the interval selected by means of the
prescaler mode register 0 (PRM0), and a capture operation is only performed when a valid level is detected twice,
thus eliminating noise with a short pulse width.
Figure 6-14. Control Register Settings for Measurement of Two Pulse Widths with Free-Running Counter
(a) 16-bit timer mode control register 0 (TMC0)
(b) Capture/compare control register 0 (CRC0)
Remark
0/1: When these bits are reset to 0 or set to 1, the other functions can be used along with the pulse
width measurement function. For details, see Figures 6-2 and 6-3.
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
0
CRC00
1
CRC0
CR00 as capture register
Captures valid edge of TI01/P21 pin to CR00
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 ...