AT89LP3240 Atmel Corporation, AT89LP3240 Datasheet - Page 63

no-image

AT89LP3240

Manufacturer Part Number
AT89LP3240
Description
Manufacturer
Atmel Corporation
Datasheet

Specifications of AT89LP3240

Flash (kbytes)
32 Kbytes
Max. Operating Frequency
20 MHz
Cpu
8051-1C
Max I/o Pins
38
Spi
1
Twi (i2c)
1
Uart
1
Adc Channels
8
Adc Resolution (bits)
10
Adc Speed (ksps)
153.8
Sram (kbytes)
4.25
Eeprom (bytes)
8192
Self Program Memory
IAP
Operating Voltage (vcc)
2.4 to 3.6
Timers
3
Isp
SPI/OCD
Watchdog
Yes

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
AT89LP3240-20AU
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
AT89LP3240-20JU
Manufacturer:
Atmel
Quantity:
10 000
Figure 12-1. Timer 2 Diagram: Capture Mode
12.3
12.3.1
3706C–MICRO–2/11
Auto-Reload Mode
Up Counter
T2EX PIN
OSC
T2 PIN
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. The overflow and reload values depend on the Timer 2 Count Mode bits, T2CM
T2MOD. A summary of the Auto-Reload behaviors is listed in
Table 12-5.
Figure 12-2
this mode Timer 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 tran-
sition at external input T2EX. This transition also sets the EXF2 bit. Both the TF2 and EXF2 bits
can generate an interrupt. The Timer 2 overflow rate for this mode is given in the following
equation:
Timer 2 may also be configured to count from MIN to TOP instead of BOTTOM to MAX by set-
ting T2CM
DCEN = 0, T2CM = 00B
÷TPS
T2CM
Auto-Reload Mode:
TRANSITION
DETECTOR
00
00
00
01
01
01
10
11
1-0
1-0
shows Timer 2 automatically counting up when DCEN = 0 and T2CM
= 01B. In this mode Timer 2 counts up to TOP, the 16-bit value in RCAP2H and
Table
Summary of Auto-Reload Modes
C/T2 = 0
C/T2 = 1
DCEN
12-4). Upon reset, the DCEN bit is set to 0 so that timer 2 will default to
X
X
0
1
1
0
1
1
EXEN2
TR2
T2EX
CAPTURE
X
X
X
X
0
1
0
1
Time-out Period
Direction
Up-Down
Up-Down
Down
Down
Up
Up
Up
Up
RCAP2L
TL2
EXF2
=
RCAP2H
Behavior
BOTTOM
MAX
BOTTOM
MIN
TOP
MIN
MIN
MIN
65536
------------------------------------------------------------------------------ -
TH2
Oscillator Frequency
TOP
TOP
TOP
TOP
MIN
BOTTOM
OVERFLOW
{
AT89LP3240/6440
RCAP2H RCAP2L
Table
MAX
MAX
reload to MIN
underflow to TOP
overflow to MIN
TF2
MIN
MIN
reload to BOTTOM
underflow to MAX
overflow to BOTTOM
12-5.
and repeat
and repeat
,
INTERRUPT
TIMER 2
}
×
1-0
(
TPS
= 00B. In
+
1-0
1
63
)
in

Related parts for AT89LP3240