English
Language : 

Z51F3220FNX Datasheet, PDF (303/312 Pages) Zilog, Inc. – Z8051 Series 8-Bit Microcontrollers
Z51F3220
Product Specification
15.1.9 Write Mode
The sector Write program procedure in user program mode
1. Page buffer clear (FMCR=0x01)
2. Write data 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 – sector write
MOV
NOP
NOP
NOP
FMCR,#0x01
MOV
MOV
MOV
MOV
A,#0
R0,#64
DPH,#0x80
DPL,#0
Pgbuf_WR: MOVX
INC
INC
DJNZ
@DPTR,A
A
DPTR
R0, Pgbuf_WR
MOV
MOV
MOV
MOV
MOV
NOP
NOP
NOP
FSADRH,#0x00
FSADRM,#0x7F
FSADRL,#0x40
FIDR,#0xA5
FMCR,#0x03
MOV
MOV
MOV
MOV
MOV
A,#0
R0,#64
R1,#0
DPH,#0x7F
DPL,#0x40
Write_verify:
MOVC
SUBB
JNZ
INC
INC
DJNZ
A,@A+DPTR
A,R1
Verify_error
R1
DPTR
R0, Write_verify
;page buffer clear
;Dummy instruction, This instruction must be needed.
;Dummy instruction, This instruction must be needed.
;Dummy instruction, This instruction must be needed.
;Sector size is 64bytes
;Write data to all page buffer
;Select sector 509
;Identification value
;Start flash write mode
;Dummy instruction, This instruction must be needed.
;Dummy instruction, This instruction must be needed.
;Dummy instruction, This instruction must be needed.
;write verify
;Sector size is 64bytes
Verify_error:
PS029902-0212
PRELIMINARY
301