
11.0 In-System Programming
(Continued)
11.6 RETURN TO FLASH MEMORY WITHOUT
HARDWARE RESET
After programming the entire program memory, including
options, it is necessary to exit the Boot ROM and return to
the flash program memory for program execution. Upon
receipt and completion of the EXIT command through the
MICROWIRE/PLUS ISP, the ISP code will reset the part and
begin execution from the flash program memory as de-
scribed in the Reset section. This assumes that the FLEX bit
in the Option register was programmed to 1.
11.7 MICROWIRE/PLUS ISP
National Semiconductor provides a program, which is avail-
able from our web site at www.national.com/cop8, that is
capable of programming a device from the parallel port of a
PC. The software accepts manually input commands and is
capable of downloading standard Intel HEX Format files.
Users who wish to write their own MICROWIRE/PLUS ISP
host software should refer to the COP8 FLASH ISP User
Manual, available from the same web site. This document
includes details of command format and delays necessary
between command bytes.
The MICROWIRE/PLUS ISP supports the following features
and commands:
Write a value to the ISP Write Timing Register. NOTE:
This
must
be
the
first
MICROWIRE/PLUS ISP mode.
Erase the entire flash program memory (mass erase).
Erase a page at a specified address.
Read Option register.
Read a byte from a specified address.
Write a byte to a specified address.
Read multiple bytes starting at a specified address.
Write multiple bytes starting at a specified address.
Exit ISP and return execution to flash program memory.
The following table lists the MICROWIRE/PLUS ISP com-
mands and provides information on required parameters and
return values.
command
after
entering
TABLE 10. MICROWIRE/PLUS ISP Commands
Command
Function
Command
Value (Hex)
0x3B
Parameters
Return Data
PGMTIM_SET
Write Pulse Timing
Register
Page Erase
Value
N/A
PAGE_ERASE
0xB3
Starting Address of
Page
Confirmation Code
N/A
MASS_ERASE
Mass Erase
0xBF
N/A (The entire Flash
Memory will be erased)
Data Byte if Security not
set. 0xFF if Security set.
Option Register if address
= 0xFFFF, regardless of
Security
n Data Bytes if Security
not set.
n Bytes of 0xFF if
Security set.
READ_BYTE
Read Byte
0x1D
Address High, Address
Low
BLOCKR
Block Read
0xA3
Address High, Address
Low, Byte Count (n)
High, Byte Count (n)
Low
0
≤
n
≤
32767
Address High, Address
Low, Data Byte
Address High, Address
Low, Byte Count (0
≤
n
≤
16), n Data Bytes
N/A
Any other invalid
command will be
ignored
WRITE_BYTE
Write Byte
0x71
N/A
BLOCKW
Block Write
0x8F
N/A
EXIT
INVALID
EXIT
N/A
0xD3
N/A (Device will Reset)
N/A
Note:
The user must ensure that Block Writes do not cross a 64 byte boundary within one operation.
11.8 USER ISP AND VIRTUAL E
2
The following commands will support transferring blocks of
data from RAM to flash program memory, and vice-versa.
The user is expected to enforce application security in this
case.
Erase the entire flash program memory (mass erase).
NOTE: Execution of this command will force the device
into the MICROWIRE/PLUS ISP mode.
Erase a page of flash memory at a specified address.
Read a byte from a specified address.
Write a byte to a specified address.
C
www.national.com
30