AT89C51 In-Circuit Programming
This application note illustrates the in-
circuit programmability of the Atmel
AT89C51 Flash-based microcontroller.
Guidelines for the addition of in-circuit
programmability to AT89C51 applica-
tions are presented along with an appli-
cation example and the modifications to
it required to support in-circuit program-
ming. A method is then shown by which
the AT89C51 microcontroller in the ap-
plication can be reprogrammed re-
motely, over a commercial telephone
line. The circuitry described in this appli-
cation note supports five volt program-
ming only, requiring the use of an
AT89C51-XX-5. The standard AT89C51
requires 12 volts for programming.
The software for this application may be
obtained by downloading from Atmel’s
BBS: (408) 436-4309.
General Considerations
Circuitry added to support AT89C51 in-
circuit programming should appear
transparent to the application when pro-
gramming is not taking place.
EA#/VPP must be held high during pro-
gramming. In applications which do not
utilize external program memory, this
pin may be permanently strapped to
V
CC
. Applications utilizing external pro-
gram memory require that this pin be
held low during normal operation.
RST must be held active during pro-
gramming. A means must be provided
for overriding the application reset cir-
cuit, which typically asserts RST only
briefly after power is applied.
PSEN# must be held low during pro-
gramming, but must not be driven during
normal operation.
ALE/PROG# is pulsed low during pro-
gramming, but must not be driven during
normal operation.
During programming, AT89C51 I/O
ports are used for the application of
mode select, addresses and data, pos-
sibly requiring that the controller be iso-
lated from the application circuitry. How
this is done is application dependent
and will be addressed here only in gen-
eral terms.
Port Used for Input
During programming, the controller
must be isolated from signals sourced
by the application circuitry. A buffer with
three-state outputs might be inserted
between the application circuitry and the
controller, with the buffer outputs three-
stated when programming is enabled.
Alternately, a multiplexer might be used
to select between signal sources, with
signals applied to the controller by either
the application circuitry or the program-
mer circuitry.
Port Used for Output
No circuit changes are required if the
application circuitry can tolerate the
state changes which occur at the port
during programming. If the prior state of
the application circuitry must be main-
tained during programming, a latch
might be inserted between the controller
and the application circuitry. The latch is
enabled during programming, preserv-
ing the state of the application circuitry.
An Application Example
The AT89C51 application shown in Fig-
ure 1 is an implementation of a moving
display. This application was selected
for its simplicity and ability to show
graphically the results of in-circuit repro-
gramming. The text to be displayed is
8-Bit
Microcontroller
with Flash
Application
Note
0287C
Microcontroller
4-9
Содержание AT89C51
Страница 7: ...Figure 2 AT89C51 Moving Display Application Modified for In Circuit Programming Microcontroller 4 15 ...
Страница 8: ...Figure 3 AT89C51 Programmer 4 16 Microcontroller ...
Страница 9: ...Figure 4 FTP Transmit Mode Microcontroller 4 17 ...
Страница 10: ...Figure 5 FTP Receive Mode 4 18 Microcontroller ...