8-Bit Microcontroller With 4K Bytes Flash AT89C4051: Features
8-Bit Microcontroller With 4K Bytes Flash AT89C4051: Features
Pin Configuration
PDIP/SOIC
RST/VPP 1 20 VCC
(RXD) P3.0 2 19 P1.7
(TXD) P3.1 3 18 P1.6
XTAL2 4 17 P1.5
XTAL1 5 16 P1.4
(INT0) P3.2 6 15 P1.3
(INT1) P3.3 7 14 P1.2
(TO) P3.4 8 13 P1.1 (AIN1)
(T1) P3.5 9 12 P1.0 (AIN0)
GND 10 11 P3.7
Rev. 1001C–02/00
1
Block Diagram
2 AT89C4051
AT89C4051
XTAL1
VCC
Input to the inverting oscillator amplifier and input to the
Supply voltage.
internal clock operating circuit.
GND
XTAL2
Ground.
Output from the inverting oscillator amplifier.
Port 1
Port 1 is an 8-bit bidirectional I/O port. Port pins P1.2 to Oscillator Characteristics
P1.7 provide internal pullups. P1.0 and P1.1 require exter-
XTAL1 and XTAL2 are the input and output, respectively,
nal pullups. P1.0 and P1.1 also serve as the positive input
of an inverting amplifier which can be configured for use as
(AIN0) and the negative input (AIN1), respectively, of the
an on-chip oscillator, as shown in Figure 1. Either a quartz
on-chip precision analog comparator. The Port 1 output
crystal or ceramic resonator may be used. To drive the
buffers can sink 20 mA and can drive LED displays directly.
device from an external clock source, XTAL2 should be left
When 1s are written to Port 1 pins, they can be used as
unconnected while XTAL1 is driven as shown in Figure 2.
inputs. When pins P1.2 to P1.7 are used as inputs and are
There are no requirements on the duty cycle of the external
externally pulled low, they will source current (IIL) because
clock signal, since the input to the internal clocking circuitry
of the internal pullups.
is through a divide-by-two flip-flop, but minimum and maxi-
Port 1 also receives code data during Flash programming mum voltage high and low time specifications must be
and verification. observed.
RST
Reset input. All I/O pins are reset to 1s as soon as RST
goes high. Holding the RST pin high for two machine
cycles while the oscillator is running resets the device.
3
Special Function Registers
A map of the on-chip memory area called the Special Func- User software should not write 1s to these unlisted loca-
tion Register (SFR) space is shown in the table below. tions, since they may be used in future products to invoke
Note that not all of the addresses are occupied, and unoc- new features. In that case, the reset or inactive values of
cupied addresses may not be implemented on the chip. the new bits will always be 0.
Read accesses to these addresses will in general return
random data, and write accesses will have an indetermi-
nate effect.
0F0H B 0F7H
00000000
0E8H 0EFH
0C0H 0C7H
0B8H IP 0BFH
XXX00000
0B0H P3 0B7H
11111111
0A8H IE 0AFH
0XX00000
0A0H 0A7H
4 AT89C4051
AT89C4051
5
Brown-out Detection
When VCC drops below the detection threshold, all port pins erated after a delay of typically 15 msec. The nominal
(except P1.0 and P1.1) are weakly pulled high. When VCC brown-out detection threshold is 2.3V ± 10%.
goes back up again, an internal Reset is automatically gen-
VCC
2.3V 2.3V
PORT PIN
INTERNAL RESET
15 msec.
6 AT89C4051
AT89C4051
Chip Erase: The entire PEROM array (4K bytes) and the Programming Interface
two Lock Bits are erased electrically by using the proper
combination of control signals and by holding P3.2 low for Every code byte in the Flash array can be written and the
10 ms. The code array is written with all “1”s in the Chip entire array can be erased by using the appropriate combi-
Erase operation and must be executed before any non- nation of control signals. The write operation cycle is self-
blank memory byte can be re-programmed. timed and once initiated, will automatically time itself to
completion.
Reading the Signature Bytes: The signature bytes are
read by the same procedure as a normal verification of All major programming vendors offer worldwide support for
locations 000H, 001H, and 002H, except that P3.5 and the Atmel microcontroller series. Please contact your local
P3.7 must be pulled to a logic low. The values returned are programming vendor for the appropriate software revision.
as follows.
(000H) = 1EH indicates manufactured by Atmel
(001H) = 41H indicates 89C4051
Bit - 2 12V H H L L
7
Figure 3. Programming the Flash Memory
AT89C4051
PP
AT89C4051
8 AT89C4051
AT89C4051
9
Absolute Maximum Ratings*
Operating Temperature ................................. -55°C to +125°C *NOTICE: Stresses beyond those listed under “Absolute
Maximum Ratings” may cause permanent dam-
Storage Temperature ..................................... -65°C to +150°C age to the device. This is a stress rating only and
functional operation of the device at these or any
Voltage on Any Pin other conditions beyond those indicated in the
with Respect to Ground .....................................-1.0V to +7.0V operational sections of this specification is not
implied. Exposure to absolute maximum rating
Maximum Operating Voltage ............................................ 6.6V conditions for extended periods may affect device
reliability.
DC Output Current...................................................... 25.0 mA
DC Characteristics
TA = -40°C to 85°C, VCC = 3.0V to 6.0V (unless otherwise noted)
Symbol Parameter Condition Min Max Units
VIL Input Low-voltage -0.5 0.2 VCC - 0.1 V
VIH Input High-voltage (Except XTAL1, RST) 0.2 VCC + 0.9 VCC + 0.5 V
VIH1 Input High-voltage (XTAL1, RST) 0.7 VCC VCC + 0.5 V
VOL Output Low-voltage(1) IOL = 20 mA, VCC = 5V 0.5 V
(Ports 1, 3) IOL = 10 mA, VCC = 2.7V
10 AT89C4051
AT89C4051
11
Serial Port Timing: Shift Register Mode Test Conditions
VCC = 5.0V ± 20%; Load Capacitance = 80 pF
12 MHz Osc Variable Oscillator
Symbol Parameter Min Max Min Max Units
tXLXL Serial Port Clock Cycle Time 1.0 12tCLCL µs
tQVXH Output Data Setup to Clock Rising Edge 700 10tCLCL-133 ns
tXHQX Output Data Hold after Clock Rising Edge 50 2tCLCL-117 ns
tXHDX Input Data Hold after Clock Rising Edge 0 0 ns
tXHDV Clock Rising Edge to Input Data Valid 700 10tCLCL-133 ns
Note: 1. AC Inputs during testing are driven at VCC - 0.5V for a Note: 1. For timing purposes, a port pin is no longer floating
logic 1 and 0.45V for a logic 0. Timing measurements when a 100 mV change from load voltage occurs. A
are made at VIH min. for a logic 1 and VIL max. for a port pin begins to float when 100 mV change frothe
logic 0. loaded VOH/VOL level occurs.
12 AT89C4051
AT89C4051
AT89C4051
TYPICAL ICC - ACTIVE (85˚C)
20
Vcc=6.0V
I 15
C Vcc=5.0V
C 10
Vcc=3.0V
m
A 5
0
0 6 12 18 24
FREQUENCY (MHz)
AT89C4051
TYPICAL ICC - IDLE (85˚C)
3
Vcc=6.0V
I
C 2 Vcc=5.0V
C
m 1
A
Vcc=3.0V
0
0 3 6 9 12
FREQUENCY (MHz)
AT89C4051
TYPICAL ICC vs. VOLTAGE- POWER DOWN (85˚C)
20
I 15
C
C 10
µ
A 5
0
3.0V 4.0V 5.0V 6.0V
Vcc VOLTAGE
13
Ordering Information
Speed Power
(MHz) Supply Ordering Code Package Operation Range
12 3.0V to 6.0V AT89C4051-12PC 20P3 Commercial
AT89C4051-12SC 20S (0°C to 70°C)
AT89C4051-12PI 20P3 Industrial
AT89C4051-12SI 20S (-40°C to 85°C)
24 4.0V to 6.0V AT89C4051-24PC 20P3 Commercial
AT89C4051-24SC 20S (0°C to 70°C)
AT89C4051-24PI 20P3 Industrial
AT89C4051-24SI 20S (-40°C to 85°C)
Package Type
20P3 20-lead, 0.300” Wide, Plastic Dual In-line Package (PDIP)
20S 20-lead, 0.300” Wide, Plastic Gull Wing Small Outline (SOIC)
14 AT89C4051
AT89C4051
Packaging Information
20P3, 20-lead, 0.300" Wide, Plastic Dual Inline 20S, 20-lead, 0.300" Wide, Plastic Gull WIng Small
Package (PDIP) Outline (SOIC)
Dimensions in Inches and (Millimeters) Dimensions in Inches and (Millimeters)
JEDEC STANDARD MS-001 AD
.090(2.29)
.900(22.86) REF MAX
.050 (1.27) BSC
.210(5.33) .005(.127)
MAX MIN
SEATING
PLANE 0.513 (13.0)
0.497 (12.6) 0.105 (2.67)
.150(3.81) .015(.381) MIN 0.092 (2.34)
.115(2.92) .022(.559)
.014(.356)
.070(1.78)
.110(2.79) 0.012 (0.305)
.045(1.13)
.090(2.29) 0.003 (0.076)
.325(8.26)
.300(7.62)
0
REF 0.013 (0.330)
0 REF 8
0.009 (0.229)
.014(.356) 15
.008(.203)
0.035 (0.889)
.430(10.92) MAX 0.015 (0.381)
15
Atmel Headquarters Atmel Operations
Corporate Headquarters Atmel Colorado Springs
2325 Orchard Parkway 1150 E. Cheyenne Mtn. Blvd.
San Jose, CA 95131 Colorado Springs, CO 80906
TEL (408) 441-0311 TEL (719) 576-3300
FAX (408) 487-2600 FAX (719) 540-1759
Europe Atmel Rousset
Atmel U.K., Ltd. Zone Industrielle
Coliseum Business Centre 13106 Rousset Cedex
Riverside Way France
Camberley, Surrey GU15 3YL TEL (33) 4-4253-6000
England FAX (33) 4-4253-6001
TEL (44) 1276-686-677
FAX (44) 1276-686-697
Asia
Atmel Asia, Ltd.
Room 1219
Chinachem Golden Plaza
77 Mody Road Tsimhatsui
East Kowloon
Hong Kong
TEL (852) 2721-9778
FAX (852) 2722-1369
Japan
Atmel Japan K.K.
9F, Tonetsu Shinkawa Bldg.
1-24-8 Shinkawa
Chuo-ku, Tokyo 104-0033
Japan
TEL (81) 3-3523-3551
FAX (81) 3-3523-7581
Fax-on-Demand
North America:
1-(800) 292-8635
International:
1-(408) 441-0732
e-mail
literature@[Link]
Web Site
[Link]
BBS
1-(408) 436-4309