Rainbow-electronics АТ89С51 User Manual

Browse online or download User Manual for Sensors Rainbow-electronics АТ89С51. Rainbow Electronics АТ89С51 User Manual

  • Download
  • Add to my manuals
  • Print
  • Page
    / 11
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 0
5-11
AT89C51 In-Circuit Programming
This application note illustrates the in-cir-
cuit 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
application can be reprogrammed
remotely, 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 program
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 program-
ming, but must not be driven during nor-
mal 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, possibly
requiring that the controller be isolated
from the application circuitry. How this is
done is application dependent and will
be addressed here only in general
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 control-
ler, with the buffer outputs three-stated
when programming is enabled. Alter-
nately, a multiplexer might be used to
select between signal sources, with sig-
nals 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 maintained
during programming, a latch might be
inserted between the controller and the
application circuitry. The latch is enabled
during programming, preserving 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 graphi-
cally the results of in-circuit reprogram-
ming. The text to be displayed is pro-
grammed into the controller as part of its
firmware, and cannot be changed with-
out reprogramming the device.
0287D-B–9/97
8-Bit
Microcontroller
with Flash
Application
Note
Page view 0
1 2 3 4 5 6 ... 10 11

Summary of Contents

Page 1 - Application

5-11AT89C51 In-Circuit ProgrammingThis application note illustrates the in-cir-cuit programmability of the AtmelAT89C51 Flash-based microcontroller.Gu

Page 2

Microcontroller5-20Figure 5. FTP Receive Mode

Page 3

Microcontroller5-21Appendix I: Intel Hex File DefinitionHexadecimal object file format (Intel hex) is produced bymost 80C51 assembler products.Each re

Page 4

Microcontroller5-12The displayed text is presented in one of two modesselected by the four-position DIP switch. In the first mode,one character at a t

Page 5

Microcontroller5-13Remote Programming Over a Commercial Telephone LineThe programmer and display application described previ-ously are connected to a

Page 6

Microcontroller5-141200 baud modem. During normal operation, the applica-tion executes its internal program while the modem andprogrammer monitor the

Page 7

Microcontroller5-15If the reset delay expires prior to the reception of a validend-of-file packet, the modem will drop the line and the pro-grammer wi

Page 8

Microcontroller5-16Figure 1. AT89C51 Moving Display Application ExampleD0D1D2D3D4D5D6A0A1WRDL1414TU2891011211254D0D1D2D3D4D5D6A0A1WRDL1414TU389101121

Page 9

Microcontroller5-17Figure 2. AT89C51 Moving Display Application Modified for In-Circuit Programming

Page 10

Microcontroller5-18Figure 3. AT89C51 Programmer

Page 11

Microcontroller5-19Figure 4. FTP Transmit Mode

Comments to this Manuals

No comments