MC96FM204/FM214
April 7, 2016 Ver. 1.8
163
15.1.11 Read Mode
The Reading program procedure in user program mode
1. Load receive data from flash memory on MOVC instruction by indirectly addressing mode.
Program Tip
–
reading
MOV
A,#0
MOV
DPH,#0x0F
MOV
DPL,#0xA0
;flash memory address
MOVC A,@A+DPTR
;read data from flash memory
15.1.12 Hard Lock Mode
The Code Write Protection program procedure in user program mode
1. Set flash identification register (FIDR).
2. Check the UserID for to prevent the invalid work
(Note)
.
3. Set flash mode control register (FMCR).
Note)
Please refer to the chapter
“Protection for Invalid Erase/Write”.
Program Tip
–
Code Write Protection
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,#0x04
;Start flash Code Write Protection 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.
No_WriteErase:
MOV
FIDR,#00H
MOV
UserID1,#00H
MOV
UserID2,#00H
---
Содержание MC96FM204
Страница 17: ...MC96FM204 FM214 April 7 2016 Ver 1 8 17 4 Package Diagram Figure 4 1 20 Pin SOP Package ...
Страница 18: ...MC96FM204 FM214 18 April 7 2016 Ver 1 8 Figure 4 2 20 Pin TSSOP Package ...
Страница 19: ...MC96FM204 FM214 April 7 2016 Ver 1 8 19 Figure 4 3 16 Pin SOP Package ...
Страница 20: ...MC96FM204 FM214 20 April 7 2016 Ver 1 8 Figure 4 4 16 Pin TSSOP Package ...