124
CHAPTER 6 16-BIT TIMER/EVENT COUNTER
Preliminary User’s Manual U13420EJ2V0UM00
6.5.4 External event counter operation
The external event counter counts the number of external clock pulses to be input to the TI00/TO0/P20 pin with
16-bit timer/counter 0 (TM0).
TM0 is incremented each time the valid edge specified with the prescaler mode register 0 (PRM0) is input.
When the TM0 counted value matches 16-bit timer capture/compare register 00 (CR00) value, TM0 is cleared to
0 and the interrupt request signal (INTTM00) is generated.
Input the value except 0000H to CR00. (Count operation with a pulse cannot be carried out.)
The rising edge, the falling edge, or both edges can be selected with bits 4 and 5 (ES00 and ES01) of prescaler
mode register 0 (PRM0).
Because operation is carried out only after the valid edge is detected twice by sampling at internal clock (f
X
/2
3
),
noise with short pulse widths can be removed.
Caution
When used as an external event counter, the P20/TI00/TO0 pin cannot be used as timer output
(TO0).
Figure 6-21. Control Register Settings in External Event Counter Mode
(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 the external event counter.
See Figures 6-2 and 6-3.
0
0
0
0
TMC03
1
TMC02
1
TMC01
0/1
OVF0
0
TMC0
Clears and starts on coincidence between TM0 and CR00.
0
0
0
0
0
CRC02
0/1
CRC01
0/1
CRC00
0
CRC0
CR00 as compare 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 ...