beautypg.com

Rainbow Electronics T89C51RD2 User Manual

Page 62

background image

Rev. F - 15 February, 2001

62

T89C51RD2

PROGRAM DATA PAGE

Input Parameters:
R0 = osc freq (integer Not required)
R1 = 09h
DPTR0 = address of the first byte to program in the FLASH memory
DPTR1 = address in XRAM of the first data to program (second data pointer)
ACC = number of bytes to program
Return Parameter
ACC = 00 if pass, !00 if fail
Remark: number of bytes to program is limited such as the FLASH write remains in a single 128bytes
page. Hence, when ACC is 128, valid values of DPL are 00h, or, 80h.

ERASE BOOT VECTOR
STATUS BYTE

Input Parameters:
R0 = osc freq (integer Not required, left for Philips compatibility)
R1 = 04h
DPH = 00h
DPL = don’t care
Return Parameter
none

PROGRAM SOFTWARE
SECURITY BIT

Input Parameters:
R0 = osc freq (integer Not required, left for Philips compatibility)
R1 = 05h
DPH = 00h
DPL = 00h – security bit # 1 (inhibit writing to FLASH)

01h – security bit # 2 (inhibit FLASH verify)
10h - allows ISP writing to FLASH*
11h - allows ISP FLASH verify*

Return Parameter
none

PROGRAM BOOT
STATUS BYTE

Input Parameters:
R0 = osc freq (integer Not required, left for Philips compatibility)
R1 = 06h
DPH = 00h
DPL = 00h – program status byte
ACC = status byte
Return Parameter
ACC = status byte

PROGRAM BOOT
VECTOR

Input Parameters:
R0 = osc freq (integer Not required, left for Philips compatibility)
R1 = 06h
DPH = 00h
DPL = 01h – program boot vector
ACC = boot vector
Return Parameter
ACC = boot vector

READ DEVICE DATA

Input Parameters:
R1 = 03h
DPTR = address of byte to read
Return Parameter
ACC = value of byte read

READ copy of the
MANUFACTURER ID

Input Parameters:
R0 = osc freq (integer Not required, left for Philips compatibility)
R1 = 00h
DPH = 00h
DPL = 00h (manufacturer ID)
Return Parameter
ACC = value of byte read

Table 33. API calls