
Mitsubishi microcomputers
M16C / 6N0 / 6N1 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
CPU Rewrite Mode (Flash Memory Version)
232
Command
Page program
Clear status register
Read array
Read status register
X
(Note 3)
1st bus cycle
2nd bus cycle
3rd bus cycle
FF16
7016
5016
4116
Write
X
SRD
Read
Write
Lock bit program
X
7716
Write
D016
Write
Erase all unlocked blocks
X
A716
Write
X
D016
Write
WA1
WD1
Write
(Note 2)
WA0(Note 3) WD0 (Note 3)
Block erase
X
2016
Write
D016
Write
BA (Note 4)
Read lock bit status
X
7116
Write
D6
Read
(Note 5)
Mode
Address
Mode
Address
Mode
Address
Data
(D0 to D7)
Data
(D0 to D7)
Data
(D0 to D7)
(Note 6)
Note 1: When a software command is input, the high order byte of data (D8 to D15) is ignored.
Note 2: SRD = Status Register Data
Note 3: WA = Write Address, WD = Write Data
WA and WD must be set sequentially from 00 16 to FE16 (byte address; however, an even address). The page size is
256 bytes.
Note 4: BA = Block Address (Enter the maximum address of each block that is an even address.)
Note 5: D6 corresponds to the block lock status. Block not locked when D6 = "1", block locked when D6 = "0".
Note 6: X denotes a given address in the user ROM area (that is an even address).
Software Commands
Table 1.24.1 lists the software commands available with the M16C/6N group (flash memory version).
After setting the CPU rewrite mode select bit to "1", write a software command to specify an erase or
program operation. Note that when entering a software command, the upper byte (D8 to D15) is ignored.
The content of each software command is explained below.
Table 1.24.1. List of software commands (CPU rewrite mode)
Read Array Command (FF16)
The read array mode is entered by writing the command code "FF16" in the 1st bus cycle. When an
even 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 to D15), 16 bits at a time.
The read array mode is retained intact until another command is written.
Read Status Register Command (7016)
When the command code "7016" is written in the 1st bus cycle, the content of the status register is read
out at the data bus (D0 to D7) by a read in the 2nd bus cycle.
The status register is explained in the next section.
Clear Status Register Command (5016)
This command is used to clear the bits SR3 to 5 of the status register after they have been set. These
bits indicate that operation has ended in an error. To use this command, write the command code
"5016" in the 1st bus cycle.