Programming Interface
Every code byte in the Flash array can be written, and the
entire array can be erased, by using the appropriate com-
bination of control signals. The write operation cycle is
self-timed and once initiated, will automatically time itself
to completion.
All major programming vendors offer worldwide support
for the Atmel microcontroller series. Please contact your
local programming vendor for the appropriate software re-
vision.
bits is achieved by observing that their features are en-
abled.
Chip Erase: The entire Flash array is erased electrically
by using the proper combination of control signals and by
holding ALE/PROG low for 10 ms. The code array is writ-
ten with all 1s. The chip erase operation must be executed
before the code memory can be reprogrammed.
Reading the Signature Bytes: The signature bytes are
read by the same procedure as a normal verification of
locations 030H, 031H, and 032H, except that P3.6 and
P3.7 must be pulled to a logic low. The values returned are
as follows.
(030H) = 1EH indicates manufactured by Atmel
(031H) = 52H indicates 89C52
(032H) = FFH indicates 12 V programming
(032H) = 05H indicates 5 V programming
Programming the Flash (Continued)
Flash Programming Modes
Mode
RST
PSEN
ALE/
EA/
V
PP
P2.6
P2.7
P3.6
P3.7
PROG
Write Code Data
H
L
H/12V
(1)
L
H
H
H
Read Code Data
H
L
H
H
L
L
H
H
Write Lock
Bit - 1
H
L
H/12V
H
H
H
H
Bit - 2
H
L
H/12V
H
H
L
L
Bit - 3
H
L
H/12V
H
L
H
L
Chip Erase
H
L
H/12V
H
L
L
L
Read Signature
Byte
H
L
H
H
L
L
L
L
Notes: 1. The signature byte at location 032H designates
whether V
PP
= 12 V or V
PP
= 5 V should be used to
enableprogramming.
2. Chip Erase requires a 10 ms PROG pulse.
(2)
AT89C52
13