Hardware manual

Common Features Description
Atmel 8051 Microcontrollers Hardware Manual 2-35
4316A–8051–01/04
Figure 2-13. Timer/Counter 1 Mode 0: 13-bit Counter
2.11.2 Mode 1 (16-bit
Timer)
Mode 1 configures Timer 1 as a 16-bit timer with the TH1 and TL1 registers connected
in cascade (see Figure 2-10). The selected input increments the TL1 register.
2.11.3 Mode 2 (8-bit Timer
with Auto Reload)
Mode 2 configures Timer 1 as an 8-bit timer (TL1 register) with automatic reload from
the TH1 register on overflow (see Figure 2-11). TL1 overflow sets the TF1 flag in the
TCON register and reloads TL1 with the contents of TH1, which is preset by software.
The reload leaves TH1 unchanged.
Figure 2-14. Timer/Counter 1 Mode 2: 8-bit Auto-reload
2.11.4 Mode 3 (Halt) Placing Timer 1 in mode 3 causes it to halt and hold its count. This can be used to halt
Timer 1 when TR1 run control bit is not available i.e., when Timer 0 is in mode 3.
2.11.5 Interrupt Each timer handles one interrupt source; that is the timer overflow flag TF0 or TF1. This
flag is set every time an overflow occurs. Flags are cleared when vectoring to the timer
interrupt routine. Interrupts are enabled by setting
ETx bit in IE0 register. This assumes
interrupts are globally enabled by setting EA bit in the IE0 register.
Periph
Clock
/6
INT1 Pin
Periph
Clock
6