ML51/ML54/ML56
Sep. 01, 2020
Page
357
of 719
Rev 2.00
ML
51
/ML
54
/ML
5
6 S
E
RI
E
S
TECHNI
CA
L
RE
F
E
R
E
NC
E
M
A
NU
A
L
ML51/M
L54
/M
L56
Series
Tec
hnical Reference
Manual
MOV IAPFD,#0FFh
CALL Trigger_IAP
RET
Read_CONFIG:
MOV IAPCN,#BYTE_READ_CONFIG
MOV IAPAH,#00h
MOV IAPAL,#02h
CALL Trigger_IAP
MOV R7,IAPFD
RET
Program_CONFIG:
MOV IAPCN,#BYTE_PROGRAM_CONFIG
MOV IAPAH,#00h
MOV IAPAL,#02h
MOV A,R7
ANL A,#11111011b
MOV IAPFD,A
;disable BOD reset
MOV R6,A
;temp data
CALL Trigger_IAP
RET
Program_CONFIG_Verify:
MOV IAPCN,#BYTE_READ_CONFIG
MOV IAPAH,#00h
MOV IAPAL,#02h
CALL Trigger_IAP
MOV B,R6
MOV A,IAPFD
CJNE A,B,Program_CONFIG_Verify_Error
RET
Program_CONFIG_Verify_Error:
CALL Disable_IAP
MOV P0,#00h
SJMP $
;********************************************************************
; APROM code
;********************************************************************
AP_code:
DB 75h,0B1h, 00h
;OPCODEs of “MOV P0M1,#0”
DB 75h,0Ach, 00h
;OPCODEs of “MOV P3M1,#0”
DB 75h, 90h, 55h
;OPCODEs of “MOV P1,#55h”
DB 75h,0A0h,0Aah
;OPCODEs of “MOV P2,#0Aah”
DB 80h,0Feh
;OPCODEs of “SJMP $”
END
6.3.2
In-Circuit-Programming (ICP)
The Flash Memory can be programmed by “In-Circuit-Programming” (ICP). If the product is just under