When enabling the internal xdata memory (XRAMEN EQ 1 in START_AD.A51), writing to the flash/EE data memory fails with error code 15 in ECON in the code below. If XRAMEN is set to 0, xdata does not work, but writing to the flash/EE data memory works. What do I have to do so I can use the internal xdata memory and write to the flash/EE data memory?
int SpWrite(int adress, char b1, char b2, char b3, char b4) { int high = adresse >> 8; int low = adresse & 0xFF; int ret; EADRH = high; EADRL = low; EDATA1 = b1; EDATA2 = b2; EDATA3 = b3; EDATA4 = b4; ECON=5; // Erase ECON=2; // write ECON=4; // verify ret = ECON; return ret; }
This is total absolute gobbelygook. If you want to discuss features unique to a certain derivative STATE WHAT DERIVATIVE you are discussing Erik
"This is total absolute gobbelygook. If you want to discuss features unique to a certain derivative STATE WHAT DERIVATIVE you are discussing" How rude can you get? Try reading the post before yelling at people. Stefan