Rainbow Electronics AT89C5131 User Manual
Page 46

46
AT89C5131
4136A–USB–03/03
Table 41. API Calls
API Call
Parameter
PROGRAM DATA BYTE
Input Parameters:
R0 = osc freq (integer Not required, left for Philips
compatibility)
R1 = 02h
DPTR = address of byte to program
ACC = byte to program
Return Parameter
ACC = 00 if pass,!00 if fail
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 BLOCK
Input Parameters:
R0 = osc freq (integer Not required, left for Philips
compatibility)
R1 = 01h
DPH = block number in bits 7:5, bits 4:0 =’0’
DPL = 00h
Return Parameter
None
Remark: Command for Philips compatibility, as no erase
is needed; the ISP firmware write FFh in the
corresponding block.
ERASE BOOT VECTOR
Input Parameters:
R0 = osc freq (integer Not required, left for Philips
compatibility)
R1 = 04h
DPH = 00h
DPL = don’t care
Return Parameter
none