Datasheet

REV. 0
ADuC816
–38–
Using the Flash/EE Program Memory
The 8 Kbyte Flash/EE Program Memory array is mapped
into the lower 8 Kbytes of the 64 Kbytes program space
addressable by the ADuC816, and is used to hold user code
in typical applications.
The program memory Flash/EE memory arrays can be pro-
grammed in one of two modes, namely:
Serial Downloading (In-Circuit Programming)
As part of its factory boot code, the ADuC816 facilitates
serial code download via the standard UART serial port.
Serial download mode is automatically entered on power-up if
the external pin, PSEN, is pulled low through an external
resistor as shown in Figure 27. Once in this mode, the user can
download code to the program memory array while the device is
sited in its target application hardware. A PC serial download
executable is provided as part of the ADuC816 QuickStart devel-
opment system. The Serial Download protocol is detailed in a
MicroConverter Applications Note uC004 available from the ADI
MicroConverter Website at www.analog.com/microconverter.
PSEN
ADuC816
PULL PSEN LOW DURING RESET
TO CONFIGURE THE ADuC816
FOR SERIAL DOWNLOAD MODE
1k
Figure 27. Flash/EE Memory Serial Download Mode
Programming
Parallel Programming
The parallel programming mode is fully compatible with conven-
tional third party Flash or EEPROM device programmers. A
block diagram of the external pin configuration required to support
parallel programming is shown in Figure 28. In this mode, Ports 0,
1, and 2 operate as the external data and address bus interface,
ALE operates as the Write Enable strobe, and Port 3 is used as a
general configuration port that configures the device for various
program and erase operations during parallel programming.
The high voltage (12 V) supply required for Flash/EE program-
ming is generated using on-chip charge pumps to supply the high
voltage program lines.
V
DD
GND
P3
PSEN
RESET
P0
P1
P2
ALE
ADuC816
5V
PROGRAM MODE
(SEE TABLE XII)
GND
PROGRAM
DATA
(D0–D7)
PROGRAM
ADDRESS
(A0–A13)
(P2.0 = A0)
(P1.7 = A13)
WRITE ENABLE
STROBE
COMMAND
ENABLE
P3.0
NEGATIVE
EDGE
P3.6
ENTRY
SEQUENCE
V
DD
Figure 28. Flash/EE Memory Parallel Programming
Table XII. Flash/EE Memory Parallel Programming Modes
Port 3 Pins Programming
0.7 0.6 0.5 0.4 0.3 0.2 0.1 Mode
XXXX000Erase Flash/EE
Program, Data, and
Security Modes
XXXX001Read Device
Signature/ID
XXX1010Program Code Byte
XXX0010Program Data Byte
XXX1011Read Code Byte
XXX0011Read Data Byte
XXXX100Program Security
Modes
XXXX101Read/Verify Security
Modes
All Other Codes Redundant
Flash/EE Program Memory Security
The ADuC816 facilitates three modes of Flash/EE program
memory security. These modes can be independently activated,
restricting access to the internal code space. These security
modes can be enabled as part of the user interface available on all
ADuC816 serial or parallel programming tools referenced on the
MicroConverter web page at www.analog.com/microconverter.
The security modes available on the ADuC816 are described
as follows:
Lock Mode
This mode locks code in memory, disabling parallel program-
ming of the program memory although reading the memory in
parallel mode is still allowed. This mode is deactivated by initi-
ating a “code-erase” command in serial download or parallel
programming modes.
Secure Mode
This mode locks code in memory, disabling parallel programming
(program and verify/read commands) as well as disabling the
execution of a “MOVC” instruction from external memory,
which is attempting to read the op codes from internal memory.
This mode is deactivated by initiating a “code-erase” command
in serial download or parallel programming modes.
REV. A