
Philips Semiconductors
Product data
P89C660/P89C662/P89C664/
P89C668
80C51 8-bit Flash microcontroller family
16KB/32KB/64KB ISP/IAP Flash with 512B/1KB/2KB/8KB RAM
2002 Oct 28
73
IAP CALL
PARAMETER
READ SECURITY BITS
Input Parameters:
R0 = osc freq (integer)
R1 = 07h
R1 = 87h (WDT feed, Rx2 & 66x only)
DPH = 00h
DPL = 00h (security bits)
Return Parameter
ACC = value of byte read
Sample routine:
;*****reads the Security Bits (SBits) *****
;***** SBits returned in ACC (2:0)
RDSBits:
MOV
AUXR1,#20H
MOV
R0,#11
MOV
R1,#07H
MOV
DPTR,#0000H
CALL
PGM_MTP
RET
;set the ENBOOT bit
;FOSC
;read misc function
;specify security bits
;execute the function
READ STATUS BYTE
Input Parameters:
R0 = osc freq (integer)
R1 = 07h
R1 = 87h (WDT feed, Rx2 & 66x only)
DPH = 00h
DPL = 01h (status byte)
Return Parameter
ACC = value of byte read
Sample routine:
;*****reads the Status Byte (SB) *****
;***** SB returned in ACC
RDSB:
MOV
AUXR1,#20H
MOV
R0,#11
MOV
R1,#07H
MOV
DPTR,#0001H
CALL
PGM_MTP
RET
;set the ENBOOT bit
;FOSC
;read misc function
;specify status byte
;execute the function
READ BOOT VECTOR
Input Parameters:
R0 = osc freq (integer)
R1 = 07h
R1 = 87h (WDT feed, Rx2 & 66x only)
DPH = 00h
DPL = 02h (boot vector)
Return Parameter
ACC = value of byte read
Sample routine:
;*****reads the Boot Vector (BV) *****
;***** BV returned in ACC
RDBV:
MOV
AUXR1,#20H
MOV
R0,#11
MOV
R1,#07H
MOV
DPTR,#0002H
CALL
PGM_MTP
RET
;set the ENBOOT bit
;FOSC
;read misc function
;specify boot vector
;execute the function