English
Language : 

Z51F3220FNX Datasheet, PDF (302/312 Pages) Zilog, Inc. – Z8051 Series 8-Bit Microcontrollers
Z51F3220
Product Specification
The Byte erase program procedure in user program mode
1. Page buffer clear (FMCR=0x01)
2. Write ‘0’ to page buffer
3. Set flash sector address register (FSADRH/FSADRM/FSADRL).
4. Set flash identification register (FIDR).
5. Set flash mode control register (FMCR).
6. Erase verify
Program Tip – byte erase
MOV
NOP
NOP
NOP
FMCR,#0x01
MOV
MOV
MOV
MOVX
A,#0
DPH,#0x80
DPL,#0
@DPTR,A
MOV DPH,#0x80
MOV DPL,#0x05
MOVX @DPTR,A
MOV
MOV
MOV
MOV
MOV
NOP
NOP
NOP
FSADRH,#0x00
FSADRM,#0x7F
FSADRL,#0x40
FIDR,#0xA5
FMCR,#0x02
MOV
MOV
MOV
MOV
MOVC
SUBB
JNZ
A,#0
R1,#0
DPH,#0x7F
DPL,#0x40
A,@A+DPTR
A,R1
Verify_error
MOV
MOV
MOV
MOV
MOVC
SUBB
JNZ
A,#0
R1,#0
DPH,#0x7F
DPL,#0x45
A,@A+DPTR
A,R1
Verify_error
Verify_error:
;page buffer clear
;Dummy instruction, This instruction must be needed.
;Dummy instruction, This instruction must be needed.
;Dummy instruction, This instruction must be needed.
;Write ‘0’ to page buffer
;Select sector 509
;Identification value
;Start flash erase mode
;Dummy instruction, This instruction must be needed.
;Dummy instruction, This instruction must be needed.
;Dummy instruction, This instruction must be needed.
;erase verify
;0x7F40 = 0 ?
;0x7F45 = 0 ?
PS029902-0212
PRELIMINARY
300