MC96F6432
316
June 22, 2018 Ver. 2.9
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,#0x7F
MOV
DPL,#0x40
;flash memory address
MOVC A,@A+DPTR
;read data from flash memory
15.1.12 Code Write Protection 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
---
Summary of Contents for MC96F6432 Series
Page 24: ...MC96F6432 24 June 22 2018 Ver 2 9 4 Package Diagram Figure 4 1 48 Pin LQFP 0707 Package...
Page 25: ...MC96F6432 June 22 2018 Ver 2 9 25 Figure 4 2 44 Pin MQFP Package...
Page 26: ...MC96F6432 26 June 22 2018 Ver 2 9 Figure 4 3 32 Pin LQFP Package...
Page 27: ...MC96F6432 June 22 2018 Ver 2 9 27 Figure 4 4 32 Pin SOP Package...
Page 28: ...MC96F6432 28 June 22 2018 Ver 2 9 Figure 4 5 28 Pin SOP Package...