AT89LP213 Atmel Corporation, AT89LP213 Datasheet - Page 34

no-image

AT89LP213

Manufacturer Part Number
AT89LP213
Description
Manufacturer
Atmel Corporation
Datasheet

Specifications of AT89LP213

Flash (kbytes)
2 Kbytes
Max. Operating Frequency
20 MHz
Cpu
8051-1C
Max I/o Pins
14
Spi
1
Sram (kbytes)
0.125
Operating Voltage (vcc)
2.4 to 5.5
Timers
2
Isp
SPI/OCD
Watchdog
Yes
14.5.1
14.5.2
14.5.3
34
AT89LP213/214
Mode 0 – 8-bit PWM with 8-bit Logarithmic Prescaler
Mode 1 – 8-bit PWM with 8-bit Linear Prescaler
Mode 2 – 8-bit Frequency Generator
In Mode 0, TLx acts as a logarithmic prescaler driving 8-bit counter THx (see
PSCx bits in TCONB control the prescaler value. On THx overflow, the duty cycle value in RHx
is transferred to OCRx and the output pin is set high. When the count in THx matches OCRx, the
output pin is cleared low. The following formulas give the output frequency and duty cycle for
Timer 0 in PWM Mode 0. Timer 1 in PWM Mode 0 is identical to Timer 0.
Figure 14-6. Timer/Counter 1 PWM Mode 0
In Mode 1, TLx provides linear prescaling with an 8-bit auto-reload from RLx (see
page
THx overflow, the duty cycle value in RHx is transferred to OCRx and the output pin is set high.
When the count in THx matches OCRx, the output pin is cleared low. The following formulas
give the output frequency and duty cycle for Timer 0 in PWM Mode 1. Timer 1 in PWM Mode 1 is
identical to Timer 0.
Timer 0 in PWM Mode 2 functions as an 8-bit auto-reload timer, the same as normal Mode 2,
with the exception that the output pin T0 is toggled at every TL0 overflow (see
Figure 14-9 on page
used to output a square wave of varying frequency. THx acts as an 8-bit counter. The following
formula gives the output frequency for Timer 0 in PWM Mode 2.
35). On TLx overflow, TLx is loaded with the value of RLx. THx acts as an 8-bit counter. On
INT1 Pin
GATE
OSC
Mode 2:
TR1
35). Timer 1 in PWM Mode 2 is identical to Timer 0. PWM Mode 2 can be
Mode 0:
Mode 1:
÷TPS
f
out
Control
=
f
f
out
out
Oscillator Frequency
------------------------------------------------------ -
2
=
=
Duty Cycle %
Duty Cycle %
×
Oscillator Frequency
------------------------------------------------------ -
Oscillator Frequency
------------------------------------------------------ -
256
(
PSC1
256 TH0
256
×
×
(8 Bits)
(
TL1
256 RL0
2
PSC0
)
=
=
100
100
+
×
1
(8 Bits)
(8 Bits)
OCR1
-------------------- -
TPS
)
RH1
TH1
×
×
×
×
1
RH0
----------- -
RH0
----------- -
256
256
+
-------------------- -
TPS
-------------------- -
TPS
=
1
1
1
+
+
1
1
Figure
Figure 14-8
3538E–MICRO–11/10
Figure 14-7 on
14-6). The
T1
and

Related parts for AT89LP213