Hi folks, I'm writing an array of 20 bytes into EEprom on the F876 starting at EEprom address 0. I write the 20 bytes and later when I check it I find that the byte 20 has overwritten the first six bytes. At the time of writing I read back what was written and print it out - all is ok. I then immediately read it back in a second loop and it has been changed. I can't see any obvious(to me that is) programming errors. The eeprom_write() function is supplied as part of the Hitech C and I haven't had problems with this on the 'F84. I'm using Hitech Picc called from within Mplab with full optimisation. Any ideas/experiences/comments? Fid[] originally contains the array. Flask_id is defined as 0 i.e. the base address of the eeprom array here is the code snippet id = Flask_id; for (i=0;i<20;i++) sci_PutByte(Fid[i]);// Test code - print out the ram array } for (i=0;i<20;i++) eeprom_write(id,Fid[i]);//write GIE = 1;// re-enable the global irq sci_PutByte(eeprom_read(id)); // Test code - print out the EEprom data as its written id++; } for (i=0;i<20;i++) // Test code - print out the EEprom array tmp = eeprom_read(i);// sci_PutByte(tmp); } for (i=0;i<20;i++) // Test code - print out the ram array again sci_PutByte(Fid[i]); } Here is the Print out results 0102030405060708090A0B010203040506070809 <- ram printout 0102030405060708090A0B010203040506070809 <- EEprom when writing 0909090909060708090A0B010203040506070809 <- EEprom after writing 0102030405060708090A0B010203040506070809 <- ram after writing -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics