M58BW016BT, M58BW016BB, M58BW016DT, M58BW016DB
APPENDIX B. FLOW CHARTS
Figure 21. Program Flowchart and Pseudo Code
Start
Write 40h
Write Address
& Data
Read Status
Register
NO
b7 = 1
YES
NO
b3 = 0
YES
NO
b4 = 0
YES
NO
b1 = 0
YES
End
VPP Invalid
Error (1)
Program
Error (1)
Program to Protect
Block Error
Program Command:
– write 40h
– write Address & Data
(memory enters read status
state after the Program command)
do:
– read status register
(E or G must be toggled)
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
AI03850
Note: 1. If an error is found, the Status Register must be cleared before further P/E operations.
49/63