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

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 2 (8-bit Timer with Auto-
Reload)
4202D–SCR–06/05
INTx#
FCK_Tx
INTx#
FCK_Tx
Tx
Tx
TMOD reg
TMOD reg
GATEx
GATEx
/6
/6
Figure 92. Timer/Counter x (x = 0 or 1) in Mode 1
Figure 93. Mode 1 Overflow Period Formula
Mode 2 configures Timer 0 as an 8-bit Timer (TL0 register) that automatically reloads
from the TH0 register (see Figure 94). TL0 overflow sets the TF0 flag in the TCON reg-
ister and reloads TL0 with the contents of TH0, which is preset by the software. When
the interrupt request is serviced, the hardware clears TF0. The reload leaves TH0
unchanged. The next reload value may be changed at any time by writing it to the TH0
register.
Figure 95 gives the autoreload period calculation formula when in timer mode.
Figure 94. Timer/Counter x (x = 0 or 1) in Mode 2
Figure 95. Mode 2 Autoreload Period Formula
TFx
TFx
TMOD reg
PER
PER
C/Tx#
=
=
0
1
TCON reg
TCON reg
6
6 ⋅
TRx
TRx
(256 – THx)
(65536 – (THx, TLx))
F
CK_Tx
TMOD reg
C/Tx#
F
0
1
CK_Tx
(8 bits)
THx
(8 bits)
(8 bits)
THx
TLx
(8 bits)
TLx
Overflow
Overflow
TCON reg
TCON reg
TFx
TFx
Timer x
Interrupt
Request
Timer x
Interrupt
Request
149

Related parts for AT89C5122