363
MC97F60128
ABOV Semiconductor Co., Ltd.
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.
Check the UserID for to prevent the invalid work
(Note1)
.
6.
Set flash mode control register (FMCR).
7.
Erase verify
NOTE)
1.
Please refer to the chapter “Protection for Invalid Erase/Write”.
2.
Data of the address should be “00H” before writing data to an address.
3. On flash memory erase and write, it should be disabled the RXE bit of USInCR2/UARTnCR2
register.
Program Tip
–
byte write
ANL
EO,#0xF8
;Set DPTR0
MOV
FMCR,#0x01
;page buffer clear
NOP
;Dummy instruction, This instruction must be needed.
NOP
;Dummy instruction, This instruction must be needed.
NOP
;Dummy instruction, This instruction must be needed.
MOV
A,#5
MOV
DPH,#0x80
MOV
DPL,#0
MOVX
@DPTR,A
;Write data to page buffer
MOV
A,#6
MOV
DPH,#0x80
MOV
DPL,#0x05
MOVX
@DPTR,A
;Write data to page buffer
MOV
FSADRH,#SAH
;Sector Address High Byte. If used BANK1,SAH is 1.
MOV
FSADRM,#SAM
;Sector Address Middle Byte
MOV
FSADRL,#SAL
;Sector Address Low Byte
MOV
FIDR,#0xA5
;Identification value
MOV
A,#ID_DATA_1 ;Check the UserID(written by user)
CJNE A,UserID1,No_WriteErase;This routine for UserID must be needed.
MOV
A,#ID_DATA_2
CJNE A,UserID2,No_WriteErase
MOV
FMCR,#0x03
;Start flash write mode
NOP
;Dummy instruction, This instruction must be needed.
NOP
;Dummy instruction, This instruction must be needed.
NOP
;Dummy instruction, This instruction must be needed.
LJMP
Write_verify
---
No_WriteErase:
MOV
FIDR,#00H
MOV
UserID1,#00H
MOV
UserID2,#00H
---
Write_verify:
---
Verify_error:
---
Содержание MC97F60128
Страница 17: ...17 MC97F60128 ABOV Semiconductor Co Ltd 4 Package Diagram Figure 4 1 100 pin LQFP 1414 Package...
Страница 18: ...18 MC97F60128 ABOV Semiconductor Co Ltd Figure 4 2 80 Pin LQFP 1212 Package...
Страница 19: ...19 MC97F60128 ABOV Semiconductor Co Ltd Figure 4 3 80 Pin LQFP 1414 Package...
Страница 20: ...20 MC97F60128 ABOV Semiconductor Co Ltd Figure 4 4 64 Pin LQFP 1414 Package...