English
Language : 

Z51F3220FNX Datasheet, PDF (304/312 Pages) Zilog, Inc. – Z8051 Series 8-Bit Microcontrollers
Z51F3220
Product Specification
The Byte 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 – byte write
MOV
NOP
NOP
NOP
FMCR,#0x01
MOV
MOV
MOV
MOVX
A,#5
DPH,#0x80
DPL,#0
@DPTR,A
MOV
MOV
MOV
MOVX
A,#6
DPH,#0x80
DPL,#0x05
@DPTR,A
MOV
MOV
MOV
MOV
MOV
NOP
NOP
NOP
FSADRH,#0x00
FSADRM,#0x7F
FSADRL,#0x40
FIDR,#0xA5
FMCR,#0x03
MOV
MOV
MOV
MOV
MOVC
SUBB
JNZ
A,#0
R1,#5
DPH,#0x7F
DPL,#0x40
A,@A+DPTR
A,R1
Verify_error
MOV
MOV
MOV
MOV
MOVC
SUBB
JNZ
A,#0
R1,#6
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 data to page buffer
;Write data to 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
;0x7F40 = 5 ?
;0x7F45 = 6 ?
PS029902-0212
PRELIMINARY
302