![](http://datasheet.mmic.net.cn/30000/M30280M6-XXXHP_datasheet_2358793/M30280M6-XXXHP_362.png)
M16C/28 Group
Under development Preliminary specification
Specifications in this manual are tentative and subject to change.
19. Flash Memory Version
Rev.0.60 2004.02.01
page 344 of N
REJ09B0047-0060Z
Start
Program
completed
YES
NO
Note 1: Write the command code and data at even address.
Note 2: Refer to "Figure 19.8.4.1. Full Status Check and
Handling Procedure for Each Error"
Write command code ‘xx4016’ to
the write address (Note 1)
Write data to the write address
(Note 1)
FMR00=1?
Full status check
(Note 2)
Figure 19.7.4.1. Flow Chart of Program Command
19.7.3 Clear Status Register Command (5016)
This command clears the status register to “0”.
By writing ‘xx5016’ in the first bus cycle, and the FMR06 to FMR07 bits in the FMR0 register and SR4
to SR5 bits in the status register are set to “0”.
19.7.4 Program Command (4016)
The program command writes 2-byte data to the flash memory. By writing ‘xx4016’ in the first bus cycle
and data to the write address specified in the second bus cycle, the auto-programming/erasing (data
prorgramming and verify) start. Set the address value specified in the first bus cycle to same and even
address as the write address specified in the second bus cycle. The FMR00 bit in the FMR0 register
indicates whether an auto-programming operation has been completed. The FMR00 bit is set to “0”
during the auto-programming and “1” when the auto-programming operation is completed. After the
auto-programming operation is completed, the FMR06 bit in the FMR0 register indicates whether or
not the auto-programming operation has been completed as expected. (Refer to “Full Status Check”).
Also, each block disables writing (Refer to “Table 19.5.2.1”). Do not write additions to the address
which is already programmed. When commands other than a program command are executed imme-
diately after a program command, set the same address as the write address specified in the second
bus cycle of the program command, to the specified address value in the first bus cycle of the following
command. In EW1 mode, do not execute this command on the blocks where the rewrite control pro-
gram is allocated. In EW0 mode, the microcomputer enters read status register mode as soon as the
auto-programming operation starts and the status register can be read. The SR7 bit in the status
register is set to “0” as soon as the auto-programming operation starts. This bit is set to “1” when the
auto-programming operation is completed. The microcomputer remains in read status register mode
until the read array command is written. After completion of the auto-programming operation, the
status register indicates whether or not the auto-programming operation has been completed as ex-
pected.