AT89S8253 Atmel Corporation, AT89S8253 Datasheet - Page 16
![no-image](/images/manufacturer_photos/0/0/79/atmel_corporation_sml.jpg)
AT89S8253
Manufacturer Part Number
AT89S8253
Description
Manufacturer
Atmel Corporation
Datasheets
1.AT89S8253.pdf
(60 pages)
2.AT89S8253.pdf
(2 pages)
3.AT89S8253.pdf
(2 pages)
4.AT89S8253.pdf
(2 pages)
Specifications of AT89S8253
Flash (kbytes)
12 Kbytes
Max. Operating Frequency
24 MHz
Cpu
8051-12C
Max I/o Pins
32
Spi
1
Uart
1
Sram (kbytes)
0.25
Eeprom (bytes)
2048
Operating Voltage (vcc)
2.7 to 5.5
Timers
3
Isp
SPI
Watchdog
Yes
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Part Number:
AT89S8253-24AC
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
AT89S8253-24AI
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Company:
Part Number:
AT89S8253-24AU
Manufacturer:
ATMEL
Quantity:
6 250
Part Number:
AT89S8253-24AU
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Company:
Part Number:
AT89S8253-24JC
Manufacturer:
ATMEL
Quantity:
5 530
Company:
Part Number:
AT89S8253-24JC
Manufacturer:
ATM
Quantity:
3 290
Company:
Part Number:
AT89S8253-24JC
Manufacturer:
ATMEL
Quantity:
6 988
Part Number:
AT89S8253-24JC
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Figure 10-1. Timer 2 in Capture Mode
10.3
Table 10-3.
16
T2MOD Address = 0C9H
Not Bit Addressable
Symbol
–
T2OE
DCEN
Bit
T2EX PIN
Auto-reload (Up or Down Counter)
AT89S8253
OSC
Function
Not implemented, reserved for future use.
Timer 2 Output Enable bit.
When set, this bit allows Timer 2 to be configured as an up/down counter.
–
7
T2MOD – Timer 2 Mode Control Register
T2 PIN
÷12
Timer 2 can be programmed to count up or down when configured in its 16-bit auto-reload
mode. This feature is invoked by the DCEN (Down Counter Enable) bit located in the SFR
T2MOD (see
count up. When DCEN is set, Timer 2 can count up or down, depending on the value of the
T2EX pin.
Figure 10-2
are selected by bit EXEN2 in T2CON. If EXEN2 = 0, Timer 2 counts up to 0FFFFH and then sets
the TF2 bit upon overflow. The overflow also causes the timer registers to be reloaded with the
16-bit value in RCAP2H and RCAP2L. The values in RCAP2H and RCAP2L are preset by soft-
ware. If EXEN2 = 1, a 16-bit reload can be triggered either by an overflow or by a 1-to-0
transition at external input T2EX. This transition also sets the EXF2 bit. Both the TF2 and EXF2
bits can generate an interrupt if enabled.
Setting the DCEN bit enables Timer 2 to count up or down, as shown in
mode, the T2EX pin controls the direction of the count. A logic 1 at T2EX makes Timer 2 count
up. The timer will overflow at 0FFFFH and set the TF2 bit. This overflow also causes the 16-bit
–
6
TRANSITION
DETECTOR
shows Timer 2 automatically counting up when DCEN = 0. In this mode, two options
C/T2 = 0
C/T2 = 1
Table
–
5
10-3). Upon reset, the DCEN bit is set to 0 so that timer 2 will default to
EXEN2
–
4
TR2
CAPTURE
CONTROL
CONTROL
–
3
RCAP2H
TH2
EXF2
RCAP2L
–
2
TL2
Reset Value = XXXX XX00B
OVERFLOW
T2OE
1
TF2
Figure
INTERRUPT
DCEN
TIMER 2
0
3286P–MICRO–3/10
10-3. In this