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

Can not simulate AT89C51CC03 EEPROM write access

Hello

I wrote the following little test program:

#include "at89c51cc03.h"

// Write EEPROM 8-bit 'val' at address 'adr'
void Write_8bit_EEPROM (unsigned int adr, unsigned char val)  {
   EA = 0;
   EECON = 0x02;       // enable EEPROM and set write bit
   *((unsigned char xdata*)adr) = val;   // write value
   EECON = 0x50;
   EECON = 0xA0;
   EECON = 0x00;       //  disable EEPROM
   EA = 1;
}

void main()
{
  Write_8bit_EEPROM (0x0333, 0x55);
  while(1);
}


If I run this program in the target system everthing works fine. That means the value 55h is written to the EEPROM at address 333h.

If I run this program in uVision3 the memory window (address V:0x333) never shows the value 55h at the address 333h. That means I can not simulate the write access to the EEPROM.

I use uVision3 V3.20f.

Thank you for your help.

Christian

0