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

C and 89C51RD2's internal EEPROM

Hi,
Anyone successfully access Temic 89C51RD2's internal EEPROM? I have this

unsigned char xdata * data pEEAddr = 1;

void WriteOne(unsigned char val) {
unsigned char data dVal = val;

DisableGlobalInterrupt();
MapEE();
*pEEAddr = dVal;
UnMapEE();
EnableGlobalInterrupt();
}

Somehow that did not work reliably. I examined the assembler output and it looked ok (one movx instructure between the MapEE() and UnMapEE() macros).

Thanks for any insight.

Andy

0