
REV. A
–30–
ADuC834
Flash/EE Program Memory
The ADuC834 contains a 64 Kbyte array of Flash/EE program
memory. The lower 62 Kbytes of this program memory is avail-
able to the user, and can be used for program storage or indeed
as additional NV data memory.
The upper 2 Kbytes of this Flash/EE program memory array
contain permanently embedded firmware, allowing in circuit serial
download, serial debug and nonintrusive single pin emulation.
These 2 Kbytes of embedded firmware also contain a power-on
configuration routine that downloads factory calibrated coeffi-
cients to the various calibrated peripherals (ADC, temperature
sensor, current sources, bandgap references and so on).
This 2 Kbyte embedded firmware is hidden from user code.
Attempts to read this space will read 0s, i.e., the embedded firmware
appears as NOP instructions to user code.
In normal operating mode (power up default) the 62 Kbytes of
user Flash/EE program memory appear as a single block. This
block is used to store the user code as shown in Figure 17.
FFFFH
0000H
F800H
F7FFH
USER PROGRAM MEMORY
62 KBYTES OF FLASH/EE PROGRAM MEMORY IS
AVAILABLE TO THE USER. ALL OF THIS SPACE CAN
BE PROGRAMMED FROM THE PERMANENTLY
EMBEDDED DOWNLOAD/DEBUG KERNEL OR IN
PARALLEL PROGRAMMING MODE.
EMBEDDED DOWNLOAD/DEBUG KERNEL
PERMANENTLY EMBEDDED FIRMWARE ALLOWS CODE
TO BE DOWNLOADED TO ANY OF THE 62 KBYTES OF
ON-CHIP PROGRAM MEMORY. THE KERNEL PROGRAM
APPEARS AS ‘NOP’ INSTRUCTIONS TO USER CODE.
62 KBYTE
2 KBYTE
Figure 17. Flash/EE Program Memory Map in
Normal Mode
In Normal Mode, the 62 Kbytes of Flash/EE program memory
can be programmed programmed in two ways, namely:
(1) Serial Downloading (In-Circuit Programming)
The ADuC834 facilitates code download via the standard UART
serial port. The ADuC834 will enter Serial Download mode
after a reset or power cycle if the
PSEN pin is pulled low through
an external 1 k
resistor. Once in serial download mode, the
hidden embedded download kernel will execute. This allows the
user to download code to the full 62 Kbytes of Flash/EE program
memory while the device is in circuit in its target application
hardware.
A PC serial download executable is provided as part of the
ADuC834 QuickStart development system. Appliction Note
uC004 fully describes the serial download protocol that is used
by the embedded download kernel. This Appliction Note is
(2) 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 18. In this mode, Ports 0, and 2
operate as the external address bus interface, P3 operates as the
external data bus interface and P1.0 operates as the Write Enable
strobe. Port 1.1, P1.2, P1.3, and P1.4 are used as a general
configuration port that configures the device for various program
and erase operations during parallel programming.
Table XIII. Flash/EE Memory Parallel Programming Modes
Port 1 Pins
P1.4
P1.3
P1.2
P1.1
Programming Mode
0000
Erase Flash/EE Program,
Data, and Security Modes
1001
Read Device Signature/ID
1010
Program Code Byte
0010
Program Data Byte
1011
Read Code Byte
0011
Read Data Byte
1100
Program Security Modes
1101
Read/Verify Security Modes
All other codes
Redundant
VDD
GND
P1.1 -> P1.4
PSEN
RESET
P3
P0
P2
ADuC834
5V
PROGRAM MODE
(SEE TABLE XIII)
GND
PROGRAM
DATA
(D0–D7)
PROGRAM
ADDRESS
(A0–A13)
(P2.0 = A0)
(P1.7 = A13)
COMMAND
ENABLE
P1.0
EA
ENTRY
SEQUENCE
VDD
GND
P1.5 -> P1.7
TIMING
Figure 18. Flash/EE Memory Parallel Programming
User Download Mode (ULOAD)
In Figure 17 we can see that it was possible to use the 62 Kbytes
of Flash/EE program memory available to the user as one single
block of memory. In this mode all of the Flash/EE memory is
read only to user code.
However, the Flash/EE program memory can also be written to
during runtime simply by entering ULOAD mode. In ULOAD
mode, the lower 56 Kbytes of program memory can be erased
and reprogrammed by user software as shown in Figure 19.
ULOAD mode can be used to upgrade your code in the field via
any user defined download protocol. Configuring the SPI port on
the ADuC834 as a slave, it is possible to completely reprogram
the 56 Kbytes of Flash/EE program memory in only 5 seconds.
See Application Note uC007.