
CPU Rewrite Mode (Flash Memory Version)
Mitsubishi microcomputers
M30220 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
179
Start
Write 4016
Status register
read
Program
completed
NO
YES
Write address
Write data
SR4=0?
Program
error
NO
YES
SR7=1?
or
RY/BY=1?
Write
Figure 1.23.3. Program flowchart
Program Command (4016)
Program operation starts when the command code “4016” is written in the first bus cycle. Then, if the
address and data to program are written in the 2nd bus cycle, program operation (data programming
and verification) will start.
Whether the write operation is completed can be confirmed by reading the status register or the RY/
_____
BY status flag. When the program starts, the read status register mode is accessed automatically and
the content of the status register is read into the data bus (D0 - D7). The status register bit 7 (SR7) is
set to 0 at the same time the write operation starts and is returned to 1 upon completion of the write
operation. In this case, the read status register mode remains active until the Read Array command
(FF16) is written.
____
The RY/BY status flag is 0 during write operation and 1 when the write operation is completed as is
the status register bit 7.
At program end, program results can be checked by reading the status register.
Erase All Blocks Command (2016/2016)
By writing the command code “2016” in the first bus cycle and the confirmation command code “2016”
in the second bus cycle that follows, the system starts erase all blocks( erase and erase verify).
Whether the erase all blocks command is terminated can be confirmed by reading the status register
____
or the RY/BY status flag. When the erase all blocks operation starts, the read status register mode is
accessed automatically and the content of the status register can be read out. The status register bit
7 (SR7) is set to 0 at the same time the erase operation starts and is returned to 1 upon completion of
the erase operation. In this case, the read status register mode remains active until the Read Array
command (FF16) is written.