GMS90X5XC Series | HYUNDAI MicroElectronics |
TIMER 2
Timer 2 is a
counter which is selected by bit C/T2 (T2CON.1). It has three operating modes as shown in Table 5.
Table 5. Timer/Counter 2 Operating Modes
Mode |
|
| T2CON |
|
| T2MOD | T2CON | P1.1/ | Remarks | Input Clock | |||
| RCLK or |
|
|
|
|
|
| T2EX |
| external | |||
|
|
| CP/RL2 |
| TR2 | DCEN | EXEN2 |
| internal | ||||
|
|
| TCLK |
|
|
|
|
|
|
|
|
| (P1.0/T2) |
| 0 | 0 |
| 1 | 0 | 0 | X | reload upon over- | fOSC ÷ 12 | Max. | |||
Reload |
| 0 | 0 |
| 1 | 0 | 1 | ↓ | flow |
| fOSC ÷24 | ||
|
|
|
| reload trigger (fall- |
|
| |||||||
|
|
|
|
|
|
|
|
|
|
| ing edge) |
|
|
|
|
| 0 | 0 |
| 1 | 1 | X | 0 | Down counting |
|
| |
|
|
| 0 | 0 |
| 1 | 1 | X | 1 | Up counting |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
| 0 | 1 |
| 1 | X | 0 | X | 16 bit Timer/ Coun- | fOSC ÷ 12 | Max. | |||
Capture |
|
|
|
|
|
|
|
|
| ter (only |
| fOSC ÷ 24 | |
|
|
|
|
|
|
|
|
|
| ↓ | ing) |
|
|
|
|
| 0 | 1 |
| 1 | X | 1 | capture TH2,TL2 |
|
| ||
|
|
|
|
|
|
|
|
|
|
| → RC2H,RC2L |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Baud Rate |
| 1 | X |
| 1 | X | 0 | X | no overflow | fOSC ÷ 12 | Max. | ||
Generator |
|
|
|
|
|
|
|
|
| interrupt request |
| fOSC ÷ 24 | |
|
|
|
|
|
|
|
|
|
| ↓ | (TF2) |
|
|
|
|
| 1 | X |
| 1 | X | 1 | extra external inter- |
|
| ||
|
|
|
|
|
|
|
|
|
|
| rupt ("Timer 2") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Off |
| X | X |
| 0 | X | X | X | Timer 2 stops | - | - | ||
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note: ↓ = |
| falling edge |
|
|
|
|
|
|
|
| |||
|
|
|
|
|
|
|
|
|
Jan. 2001 Ver 1.0 | 19 |