This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

help WR_RD in the flash data memory code about the P89C51RD2

Now I want to read and write data in the flash data memory about the Philips 89C51RD2,as the eeprom function.
with its document,I write some test code:

void Flash_WR_RD()
{
AUXR1 = 0x01;//use the DPTR1

R0 = 25; //25MHz in board
R1 = 0x0c; //erase 4k blocks
DPH = 0x00; //block #0
DPL = 0x00;

R0 = 25;
R1 = 0x0d;//program data block
DPH = 0x08;
DPL = 0x00;
ACC = 0x10;

R0 = 25;
R1 = 0x0e;//read data block
DPH = 0x08;
DPL = 0x00;

AUXR1 = 0x00;//use DPTR0
}

But I haven't get any data what I want in memory. I don't know how can I get what I want--program store in some memory; and the data store in another area,which can read and write correct. To me some suggest,thanks.

Parents
  • I just realized that the problem may be more fundamental
    Now I want to read and write data in the flash data memory about the Philips 89C51RD2,as the eeprom function.

    1)there is no flash data memory, there is only flash code memory.

    2) there is no EEPROM (the Atmel Rx2, I believe has a small one).

    Erik

Reply
  • I just realized that the problem may be more fundamental
    Now I want to read and write data in the flash data memory about the Philips 89C51RD2,as the eeprom function.

    1)there is no flash data memory, there is only flash code memory.

    2) there is no EEPROM (the Atmel Rx2, I believe has a small one).

    Erik

Children
No data