M28W320CT, M28W320CB
Figure 12. Double Word Program Flowchart and Pseudo Code
Start
Write 30h
Command
Write Address 1
& Data 1 (3)
Write Address 2
& Data 2 (3)
Read Status
Register
NO
Suspend
YES
NO
b7 = 1
YES
Suspend
Loop
NO
b3 = 0
VPP Invalid
Error (1, 2)
YES
NO
b4 = 0
Program
Error (1, 2)
YES
b1 = 0
NO
Program to Protected
Block Error (1, 2)
YES
End
DPG instruction:
– write 30h command
– write Address 1 & Data 1 (3)
– write Address 2 & Data 2 (3)
(memory enters read status state after
the Program instruction)
do:
– read status register (E or G must be
toggled) if PES instruction given execute
DPG suspend loop
while b7 = 1
If b3 = 1, VPP invalid error:
– error handler
If b4 = 1, Program error:
– error handler
If b1 = 1, Program to protected block error:
– error handler
AI03539
Note: 1. Status check of b1 (Protected Block), b3 (VPP Invalid) and b4 (Program Error) can be made after each program operation or after
a sequence.
2. If an error is found, the Status Register must be cleared (CLRS instruction) before further P/E.C. operations.
3. Address 1 and Address 2 must be consecutive addresses differing only for address bit A0.
30/42