AT89C5122 ATMEL [ATMEL Corporation], AT89C5122 Datasheet - Page 151

no-image

AT89C5122

Manufacturer Part Number
AT89C5122
Description
MICROCONTROLLER WITH USB AND SMART CARD READER INTERFACES
Manufacturer
ATMEL [ATMEL Corporation]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
AT89C5122D-ALRUM
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
AT89C5122D-RDRIM
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
AT89C5122D-RDRUM
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
AT89C5122D-RDVIM
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
AT89C5122D-SISUM
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
AT89C5122D-UM
Manufacturer:
MAXIM
Quantity:
1 001
Part Number:
AT89C5122DS-RDTUM
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
AT89C5122DS-UM
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Mode 0 (13-bit Timer)
Mode 1 (16-bit Timer)
Mode 2 (8-bit Timer with Auto-
Reload)
Mode 3 (Halt)
4202D–SCR–06/05
Mode 0 configures Timer 1 as a 13-bit Timer, which is set up as an 8-bit Timer (TH1 reg-
ister) with a modulo-32 prescaler implemented with the lower 5 bits of the TL1 register
(see Figure 90). The upper 3 bits of TL1 register are ignored. Prescaler overflow incre-
ments the TH1 register.
Mode 1 configures Timer 1 as a 16-bit Timer with TH1 and TL1 registers connected in
cascade (see Figure 92). The selected input increments the TL1 register.
Mode 2 configures Timer 1 as an 8-bit Timer (TL1 register) with automatic reload from
the TH1 register on overflow (see Figure 94). TL1 overflow sets the TF1 flag in the
TCON register and reloads TL1 with the contents of TH1, which is preset by the soft-
ware. The reload leaves TH1 unchanged.
Placing Timer 1 in mode 3 causes it to halt and hold its count. This can be used to halt
Timer 1 when the TR1 run control bit is not available i.e. when Timer 0 is in mode 3.
When Timer 0 is in mode 3, it uses Timer 1’s overflow flag (TF1) and run control bit
(TR1). For this situation, use Timer 1 only for applications that do not require an
interrupt (such as a Baud Rate Generator for the Serial Port) and switch Timer 1 in
and out of mode 3 to turn it off and on.
It is important to stop the Timer/Counter before changing modes.
151

Related parts for AT89C5122