T89C5115 ATMEL Corporation, T89C5115 Datasheet - Page 50

no-image

T89C5115

Manufacturer Part Number
T89C5115
Description
Low Pin Count 8-bit MCU with A/D Converter and 16-Kbytes of Flash Memory
Manufacturer
ATMEL Corporation
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
T89C5115-RATIM
Manufacturer:
TI
Quantity:
1 474
Part Number:
T89C5115-RATIM
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
T89C5115-SISIM
Manufacturer:
Atmel
Quantity:
10 000
Mode 2 (8-bit Timer with Auto-
Reload)
Figure 24. Timer/Counter x (x= 0 or 1) in Mode 2
Mode 3 (Two 8-bit Timers)
Figure 25. Timer/Counter 0 in Mode 3: Two 8-bit Counters
50
see section “Clock”
INT0#
see section “Clock”
INTx#
T89C5115
CLOCK
CLOCK
CLOCK
T0
FTx
Tx
FTx
FTx
TMOD reg
GATEx
GATE0
TMOD.3
÷ 6
÷ 6
÷ 6
TMOD reg
TMOD.2
C/T0#
C/Tx#
Mode 2 configures Timer 0 as an 8-bit Timer (TL0 register) that automatically reloads
from TH0 register (see Figure 24). TL0 overflow sets TF0 flag in TCON register and
reloads TL0 with the contents of TH0, which is preset by software. When the interrupt
request is serviced, hardware clears TF0. The reload leaves TH0 unchanged. The next
reload value may be changed at any time by writing it to TH0 register.
Mode 3 configures Timer 0 such that registers TL0 and TH0 operate as separate 8-bit
Timers (see Figure 25). This mode is provided for applications requiring an additional 8-
bit Timer or Counter. TL0 uses the Timer 0 control bits C/T0# and GATE0 in TMOD reg-
ister, and TR0 and TF0 in TCON register in the normal manner. TH0 is locked into a
Timer function (counting F
run control (TR1) bits. Thus, operation of Timer 1 is restricted when Timer 0 is in mode
3.
0
1
0
1
TCON reg
TCON.4
TR0
TRx
TCON.6
TR1
PER
/6) and takes over use of the Timer 1 interrupt (TF1) and
(8 bits)
(8 bits)
(8 bits)
(8 bits)
TH0
THx
TL0
TLx
Overflow
Overflow
Overflow
TCON reg
TCON.5
TCON.7
TF0
TF1
TFx
Timer x
Interrupt
Request
Timer 0
Interrupt
Request
Timer 1
Interrupt
Request
4128A–8051–04/02

Related parts for T89C5115