Philips Semiconductors Preliminary data
P89C51RA2/RB2/RC2/RD2xx80C51 8-bit Flash microcontroller family
8KB/16KB/32KB/64KB ISP/IAP Flash with 512B/512B/512B/1KB RAM
2002 Jul 18
49
RECORD TYPE COMMAND/DATA FUNCTION
03 (Cont.) Subfunction Code = 07 (Full Chip Erase)
Erases all blocks, security bits, and sets status byte and boot vector to default values
ff = 07
ss = don’t care
dd = don’t care
Example:
:0100000307F5 full chip erase
Subfunction Code = 0C (Erase 4K Blocks)
ff = 0C
ss = block code as shown below:
Block 0 , 0k~4k , 00H
Block 1 , 4k~8k , 10H
Block 2 , 8k~12k , 20H (only available on RD2 / RC2 / RB2)
Block 3 , 12k~16k , 30H (only available on RD2 / RC2 / RB2)
Block 4 , 16k~20k , 40H (only available on RD2 / RC2)
Block 5 , 20k~24k , 50H (only available on RD2 / RC2)
Block 6 , 24k~28k , 60H (only available on RD2 / RC2)
Block 7 , 28k~32k , 70H (only available on RD2 / RC2)
Block 8 , 32k~36k , 80H (only available on RD2)
Block 9 , 36k~40k , 90H (only available on RD2)
Block 10, 40k~44k , A0H (only available on RD2)
Block 11, 44k~48k , B0H (only available on RD2)
Block 12, 48k~52k , C0H (only available on RD2)
Block 13, 52k~56k , D0H (only available on RD2)
Block 14, 56k~60k , E0H (only available on RD2)
Block 15, 60k~64k , F0H (only available on RD2)
Example:
:020000030C20CF (Erase 4k block #2)
04 Display Device Data or Blank Check – Record type 04 causes the contents of the entire Flash array to be sent out
the serial port in a formatted display. This display consists of an address and the contents of 16 bytes starting with that
address. No display of the device contents will occur if security bit 2 has been programmed. Data to the serial port is
initiated by the reception of any character and terminated by the reception of any character.
General Format of Function 04
:05xxxx04sssseeeeffcc
Where:
05 = number of bytes (hex) in record
xxxx = required field, but value is a “don’t care”
04 = “Display Device Data or Blank Check” function code
ssss = starting address
eeee = ending address
ff = subfunction
00 = display data
01 = blank check
02 = display data in data block (valid addresses: 0001~0FFFH)
cc = checksum
Example 1:
:0500000440004FFF0069 display 4000–4FFF
Example 2:
:0500000400000FFF02E7 display data in data block
(the data at address 0000 is invalid)
Philips Semiconductors Preliminary data
P89C51RA2/RB2/RC2/RD2xx80C51 8-bit Flash microcontroller family
8KB/16KB/32KB/64KB ISP/IAP Flash with 512B/512B/512B/1KB RAM
2002 Jul 18
50
RECORD TYPE COMMAND/DATA FUNCTION
05 Miscellaneous Read Functions (Selection)
General Format of Function 05
:02xxxx05ffsscc
Where:
02 = number of bytes (hex) in record
xxxx = required field, but value is a “don’t care”
05 = “Miscellaneous Read” function code
ffss = subfunction and selection code
0000 = read signature byte – manufacturer id (15H)
0001 = read signature byte – device id # 1 (C2H)
0002 = read signature byte – device id # 2
0003 = read FX2 bit
0080 = read ROM Code Revision
0700 = read security bits
0701 = read status byte
0702 = read boot vector
cc = checksum
Example 1:
:020000050001F8 read signature byte – device id # 1
Example 2:
:020000050003F6 read FX2 bit
(bit7=0 represent 12–clock mode, bit7=1 represent 6–clock mode)
Example 3:
:02000005008079 read ROM Code Revision (0A: Rev. A, 0B:Rev. B)
06 Direct Load of Baud Rate
General Format of Function 06
:02xxxx06hhllcc
Where:
02 = number of bytes (hex) in record
xxxx = required field, but value is a “don’t care”
06 = ”Direct Load of Baud Rate” function code
hh = high byte of Timer 2
ll = low byte of Timer 2
cc = checksum
Example:
:02000006F500F3
07 Program Data in Data Block
:nnaaaa07dd....ddcc
Where:
nn = number of bytes (hex) in record
aaaa = memory address of first byte in record (the valid address:0001~0FFFH)
dd....dd = data bytes
cc = checksum
Example:
:10008007AF5F67F0602703E0322CFA92007780C3F6
Philips Semiconductors Preliminary data
P89C51RA2/RB2/RC2/RD2xx80C51 8-bit Flash microcontroller family
8KB/16KB/32KB/64KB ISP/IAP Flash with 512B/512B/512B/1KB RAM
2002 Jul 18
51
In Application Programming Method
Several In Application Programming (IAP) calls are available for use by
an application program to permit selective erasing and programming of
Flash sectors. All calls are made through a common interface,
PGM_MTP. The programming functions are selected by setting up
the microcontroller’s registers before making a call to PGM_MTP at
FFF0H. The oscillator frequency is an integer number rounded down
to the nearest megahertz. For example, set R0 to 11 for 11.0592 MHz.
Results are returned in the registers. The IAP calls are shown in
Table 10.
Using the Watchdog Timer (WDT)
The P89C51Rx2 devices support the use of the WDT in IAP. The
user specifies that the WDT is to be fed by setting the most
significant bit of the function parameter passed in R1 prior to calling
PGM_MTP. The WDT function is only supported for Block Erase
when using Quick Block Erase. The Quick Block Erase is specified
by performing a Block Erase with register R0 = 0. Requesting a
WDT feed during IAP should only be performed in applications that
use the WDT since the process of feeding the WDT will start the
WDT if the WDT was not running.
Table 10. IAP calls
IAP CALL PARAMETER
PROGRAM BYTE Input Parameter:
R0 = osc freq (integer)
R1 = 02h or R1= 82h (WDT feed)
DPTR = address of byte to program
ACC = byte to program
Return Parameter:
ACC = 00 if pass, !=00 if fail
ERASE 4K CODE BLOCK
(New function)
Input Parameter:
R0 = osc freq (integer)
R1 = 0Ch or R1 = 8Ch (WDT feed)
DPH = address of 4k code block
DPH = 00H , 4k block 0, 0k~4k
DPH = 10H , 4k block 1, 4k~8k
DPH = 20H , 4k block 2, 8k~12k
DPH = 30H , 4k block 3, 12k~16k
DPH = 40H , 4k block 4, 16k~20k
DPH = 50H , 4k block 5, 20k~24k
DPH = 60H , 4k block 6, 24k~28k
DPH = 70H , 4k block 7, 28k~32k
DPH = 80H , 4k block 8, 32k~36k
DPH = 90H , 4k block 9, 36k~40k
DPH = A0H , 4k block 10, 40k~44k
DPH = B0H , 4k block 11, 44k~48k
DPH = C0H , 4k block 12, 48k~52k
DPH = D0H , 4k block 13, 52k~56k
DPH = E0H , 4k block 14, 56k~60k
DPH = F0H , 4k block 15, 60k~64k
DPL = 00h
Return Parameter:
ACC = 00 if pass, !=00 if fail
ERASE 8K / 16K CODE
BLOCK
Input Parameter:
R0 = osc freq (integer)
R1 = 01h or R1 = 81h (WDT feed)
DPH = address of code block
DPH = 00H , block 0 , 0k~8k
DPH = 20H , block 1 , 8k~16k
DPH = 40H , block 2 , 16~32k
DPH = 80H , block 3 , 32k~48k
DPH = C0H , block 4 , 48k~64k
DPL = 00h
Return Parameter:
ACC = 00 if pass , !=0 if fail
ERASE STATUS BYTE &
BOOT VECTOR
Input Parameter:
R0 = osc freq (integer)
R1 = 04h or R1 = 84h (WDT feed)
DPH = 00h
DPL = don’t care
Return Parameter:
ACC = 00 if pass , !=0 if fail

P89C51RD2BBD/01,55

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