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
70
IAP CALL PARAMETER
ERASE BOOT VECTOR &
STATUS BYTE
Input Parameters:
R0 = osc freq (integer)
R1 = 04h
R1 = 84h (WDT feed, Rx2 & 66x only)
DPH = 00h
DPL = don’t care
Return Parameter
none
Sample routine:
;***** Erase Boot Vector (BV) & Status Byte (SB) *****
;***** Note: This command erases BOTH the SB & BV
ERSBBV;
MOV AUXR1,#20H ;set the ENBOOT bit
MOV R0, #11 ;FOSC
MOV R1,#04H ;erase status byte & boot vector
MOV DPH,#00h ;we don’t care about DPL
CALL PGM_MTP ;execute the function
RET
PROGRAM SECURITY BIT Input Parameters:
R0 = osc freq (integer)
R1 = 05h
R1 = 85h (WDT feed, Rx2 & 66x only)
DPH = 00h
DPL = 00h – security bit # 1 (inhibit writing to Flash)
01h – security bit # 2 (inhibit Flash verify)
02h – security bit # 3 (disable external memory)
Return Parameter
none
Sample routines:
;***** Program Security Bit1 *****
;***** DPTR indicates security bit to program *****
WRSB1:
MOV AUXR1,#20H ;set the ENBOOT bit
MOV R0,#11 ;FOSC
MOV R1,#05H ;program security bit function
MOV DPTR,#0000h ;specify security bit 1
CALL PGM_MTP ;execute the function
RET
;***** Program Security Bit2 *****
;***** DPTR indicates security bit to program *****
WRSB2:
MOV AUXR1,#20H ;set the ENBOOT bit
MOV R0,#11 ;FOSC
MOV R1,#05H ;program security bit function
MOV DPTR,#0001h ;specify security bit 2
CALL PGM_MTP ;execute the function
RET
;***** Program Security Bit3 *****
;***** DPTR indicates security bit to program *****
WRSB3:
MOV AUXR1,#20H ;set the ENBOOT bit
MOV R0,#11 ;FOSC
MOV R1,#05H ;program security bit function
MOV DPTR,#0002h ;specify security bit 3
CALL PGM_MTP ;execute the function
RET
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
71
IAP CALL PARAMETER
PROGRAM STATUS BYTE Input Parameters:
R0 = osc freq (integer)
R1 = 06h
R1 = 86h (WDT feed, Rx2, 66x only)
DPH = 00h
DPL = 00h – program status byte
ACC = status byte
Return Parameter
ACC = 00 if pass; not 00 if fails
Sample routine:
;***** Program Status Byte (SB) *****
;***** DPTR indicates program status byte *****
;***** ACC holds new value of Status Byte to program *****
WRSB:
MOV AUXR1,#20H ;set the ENBOOT bit
MOV R0,#11 ;FOSC
MOV R1,#06H ;program status byte or boot vector
MOV DPTR,#0000h ;specify status byte
MOV A,NEW_SB ;
CALL PGM_MTP ;execute the function
RET
PROGRAM BOOT VECTOR Input Parameters:
R0 = osc freq (integer)
R1 = 06h
R1 = 86h (WDT feed, Rx2 & 66x only)
DPH = 00h
DPL = 01h – program boot vector
ACC = boot vector
Return Parameter
ACC = 00 if pass; not 00 if fails
Sample routine:
;***** Program Boot Vector (BV) *****
;***** DPTR indicates program boot vector *****
;***** ACC holds new value of boot vector to program *****
WRBV:
MOV AUXR1,#20H ;set the ENBOOT bit
MOV R0,#11 ;FOSC
MOV R1,#06H ;program status byte or boot vector
MOV DPTR,#0001h ;specify boot vector
MOV A,NEW_SB ;new value for the boot vector
CALL PGM_MTP ;execute the function
RET
READ DEVICE DATA Input Parameters:
R1 = 03h
R1 = 83h (WDT feed, Rx2 & 66x only)
DPTR = address of byte to read
Return Parameter
ACC = value of byte read
Sample routine:
;*****reads the Device Data (DData) *****
;***** DData returned in ACC *****
;***** DPTR holds address of byte to read *****
RDData:
MOV AUXR1,#20H ;set the ENBOOT bit
MOV R0,#11 ;FOSC
MOV R1,#03H ;read data function
MOV DPTR,Address ;specify address of byte to read
CALL PGM_MTP ;execute the function
RET
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
72
IAP CALL PARAMETER
READ MANUFACTURER ID Input Parameters:
R0 = osc freq (integer)
R1 = 00h
R1 = 80h (WDT feed, Rx2 & 66x only)
DPH = 00h
DPL = 00h (manufacturer ID)
Return Parameter
ACC = value of byte read
Sample routine:
;*****reads the Manufacturer ID (MID) *****
;***** MID returned in ACC (should be 15h for Philips)
RDMID:
MOV AUXR1,#20H ;set the ENBOOT bit
MOV R0,#11 ;FOSC
MOV R1,#00H ;read misc function
MOV DPTR,#0000H ;specify MID
CALL PGM_MTP ;execute the function
RET
READ DEVICE ID # 1 Input Parameters:
R0 = osc freq (integer)
R1 = 00h
R1 = 80h (WDT feed, Rx2 & 66x only)
DPH = 00h
DPL = 01h (device ID # 1)
Return Parameter
ACC = value of byte read
Sample routine:
;*****reads the Device ID 1 (DID1) *****
;***** DID1 returned in ACC
RDDID1:
MOV AUXR1,#20H ;set the ENBOOT bit
MOV R0,#11 ;FOSC
MOV R1,#00H ;read misc function
MOV DPTR,#0001H ;specify device id 1
CALL PGM_MTP ;execute the function
RET
READ DEVICE ID # 2 Input Parameters:
R0 = osc freq (integer)
R1 = 00h
R1 = 80h (WDT feed, Rx2 & 66x only)
DPH = 00h
DPL = 02h (device ID # 2)
Return Parameter
ACC = value of byte read
Sample routine:
;*****reads the Device ID 2 (DID2) *****
;***** DID2 returned in ACC
RDDID2:
MOV AUXR1,#20H ;set the ENBOOT bit
MOV R0,#11 ;FOSC
MOV R1,#00H ;read misc function
MOV DPTR,#0002H ;specify device id 2
CALL PGM_MTP ;execute the function
RET

P89C664HBA/00,512

Mfr. #:
Manufacturer:
NXP Semiconductors
Description:
IC MCU 8BIT 64KB FLASH 44PLCC
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union