AT89LP52 Atmel Corporation, AT89LP52 Datasheet - Page 53

no-image

AT89LP52

Manufacturer Part Number
AT89LP52
Description
Manufacturer
Atmel Corporation
Datasheet

Specifications of AT89LP52

Flash (kbytes)
8 Kbytes
Max. Operating Frequency
20 MHz
Cpu
8051-1C
Max I/o Pins
36
Uart
1
Sram (kbytes)
0.25
Eeprom (bytes)
256
Self Program Memory
IAP
Operating Voltage (vcc)
2.4 to 5.5
Timers
3
Isp
SPI
Watchdog
Yes

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
AT89LP52-20AU
Manufacturer:
Atmel
Quantity:
250
Part Number:
AT89LP52-20AU
Manufacturer:
Atmel
Quantity:
10 000
Company:
Part Number:
AT89LP52-20AU
Quantity:
15 490
Part Number:
AT89LP52-20JU
Manufacturer:
Atmel
Quantity:
110
Part Number:
AT89LP52-20JU
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
AT89LP52-20MU
Manufacturer:
Atmel
Quantity:
490
12.2
Figure 12-1. Timer 2 Diagram: Capture Mode
12.3
12.3.1
3709D–MICRO–12/11
Capture Mode
Auto-Reload Mode
Up Counter
T2EX PI N
OSC
T2 PI N
÷CDV
In the Capture mode, Timer 2 is a fixed 16-bit timer or counter that counts up from MIN to MAX.
An overflow from MAX to MIN sets bit TF2 in T2CON. If EXEN2 = 1, a 1-to-0 transition at exter-
nal input T2EX also causes the current value in TH2 and TL2 to be captured into RCAP2H and
RCAP2L, respectively. In addition, the transition at T2EX causes bit EXF2 in T2CON to be set.
The EXF2 and TF2 bits can generate an interrupt. Capture mode is illustrated in
The Timer 2 overflow rate in Capture mode is given by the following equation:
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. A summary of the Auto-Reload behaviors is listed in
Table 12-5.
Figure 12-2
counts up to MAX and then sets the TF2 bit upon overflow. The overflow also causes the timer
registers to be reloaded with BOTTOM, the 16-bit value in RCAP2H and RCAP2L. 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 inter-
rupt. The Timer 2 overflow rate for this mode is given in the following equation:
DCEN
÷TPS
0
1
1
Auto-Reload Mode:
TRANSITION
DETECT OR
DCEN = 0
Capture Mode:
shows Timer 2 automatically counting up when DCEN = 0. In this mode Timer 2
T2EX
Table
X
Summary of Auto-Reload Modes
0
1
C/T2 = 0
C/T2 = 1
12-4). Upon reset, the DCEN bit is set to 0 so that timer 2 will default to
Direction
Down
EXEN2
Up
Up
TR2
CAPTURE
Time-out Period
Time-out Period
Behavior
BOTTOM
MAX
BOTTOM
BOTTOM
RCAP2L
TL2
MAX
MAX
=
EXF2
65536
------------------------------------------------------------------------------ -
=
RCAP2H
reload to BOTTOM
underflow to MAX
overflow to BOTTOM
TH2
------------------------------------------------- -
System Frequency
System Frequency
{
65536
O VERFLO W
RCAP2H RCAP2L
Table
TF2
,
12-5.
AT89LP51/52
×
INTERR UPT
TIMER 2
(
TPS
}
+
×
1
(
)
Figure
TPS
+
1
12-1.
)
53

Related parts for AT89LP52