AT89LP214 Atmel Corporation, AT89LP214 Datasheet - Page 29

no-image

AT89LP214

Manufacturer Part Number
AT89LP214
Description
Manufacturer
Atmel Corporation
Datasheet

Specifications of AT89LP214

Flash (kbytes)
2 Kbytes
Max. Operating Frequency
20 MHz
Cpu
8051-1C
Max I/o Pins
12
Spi
1
Uart
1
Sram (kbytes)
0.125
Operating Voltage (vcc)
2.4 to 5.0
Timers
2
Isp
SPI/OCD
Watchdog
Yes
14.1
3538E–MICRO–11/10
Mode 0 – Variable Width Timer/Counter
However, the inputs may be exercised in software by toggling the P3.4 and P3.5 bits in the
Port 3 register.
Furthermore, the Timer or Counter functions for Timer 0 and Timer 1 have four operating modes:
variable width timer, 16-bit auto-reload timer, 8-bit auto-reload timer, and split timer. The control
bits C/T in the Special Function Register TMOD select the Timer or Counter function. The bit
pairs (M1, M0) in TMOD select the operating modes.
Both Timers in Mode 0 are 8-bit Counters with a variable prescaler. The prescaler may vary from
1 to 8 bits depending on the PSC bits in TCONB, giving the timer a range of 9 to 16 bits.
By default the timer is configured as a 13-bit timer compatible to Mode 0 in the standard 8051.
Figure 14-1
rolls over from all “1”s to all “0”s, it sets the Timer interrupt flag TF1. The counter input is enabled
to the Timer when TR1 = 1 and either GATE = 0 or INT1 = 1. Setting GATE = 1 allows the Timer
to be controlled by external input INT1, to facilitate pulse width measurements. TR1 is a control
bit in the Special Function Register TCON. GATE is in TMOD. The 13-bit register consists of all
8 bits of TH1 and the lower 5 bits of TL1. The upper 3 bits of TL1 are indeterminate and should
be ignored. Setting the run flag (TR1) does not clear the registers.
Note:
Figure 14-1. Timer/Counter 1 Mode 0: Variable Width Counter
Mode 0 operation is the same for Timer 0 as for Timer 1, except that TR0, TF0 and INT0 replace
the corresponding Timer 1 signals in
Timer 1 (TMOD.7) and one for Timer 0 (TMOD.3). The INT0 and INT1 pins are shared with the
XTAL oscillator. They may only be used for the GATE function when using the internal RC oscil-
lator as the system clock.
INT1 Pin
T1 Pin
RH1/RL1 are not required by Timer 1 during Mode 0 and may be used as temporary storage
registers.
GATE
OSC
shows the Mode 0 operation as it applies to Timer 1 in 13-bit mode. As the count
Mode 0:
TR1
÷TPS
Time-out Period
C/T = 0
C/T = 1
Control
Figure
=
14-1. There are two different GATE bits, one for
------------------------------------------------------ -
Oscillator Frequency
256
(8 Bits)
TL1
×
2
PSC0
(8 Bits)
+
TH1
1
PSC1
AT89LP213/214
×
(
TPS
TF1
+
1
)
Interrupt
29

Related parts for AT89LP214