English
Language : 

M30218 Datasheet, PDF (159/179 Pages) Mitsubishi Electric Semiconductor – M30218 Group
CPU Rewrite Mode
Mitsubishi microcomputers
M30218 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Software Commands
Table BB-1 lists the software commands available with the M30218 group (flash memory version).
When CPU rewrite mode is enabled, write software commands to the flash command register to specify
the operation to erase or program.
The content of each software command is explained below.
Table BB-1. List of Software Commands (CPU Rewrite Mode)
Command
First bus cycle
Data
Mode Address (D0 to D7)
Second bus cycle
Data
Mode Address (D0 to D7)
Read
Write 03B616 0016
Program
Write 03B616
4016
Write Program Program
address
data
Program verify
Write 03B616
C016
Read Verify
address
Verify
data
Erase
Erase verify
Write
Write
03B616
03B616
2016
A016
Write
Read
03B616
Verify
address
2016
Verify
data
Reset
Write
03B616 FF16
Write
03B616
FF16
Read Command (0016)
The read mode is entered by writing the command code “0016” to the flash command register in the
first bus cycle. When an address to be read is input in one of the bus cycles that follow, the content of
the specified address is read out at the data bus (D0–D7), 8 bits at a time.
The read mode is retained intact until another command is written.
After reset and after the reset command is executed, the read mode is set.
Program Command (4016)
The program mode is entered by writing the command code “4016” to the flash command register in
the first bus cycle. When the user execute an instruction to write byte data to the desired address (e.g.,
STE instruction) in the second bus cycle, the flash memory control circuit executes the program op-
eration. The program operation requires approximately 20 µs. Wait for 20 µs or more before the user
go to the next processing.
During program operation, the watchdog timer remains idle, with the value “7FFF16” set in it.
Note 1: The write operation is not completed immediately by writing a program command once. The
user must always execute a program-verify command after each program command executed. And if
verification fails, the user need to execute the program command repeatedly until the verification
passes. See Figure BB.3 for an example of a programming flowchart.
158