I just had a weird case of EEPROM corruption on a 16F84. The first 14 words were overwritten to the value 0xAE during a thunderstorm which tripped the power. The thunderstorm is probably a red herring, and the power loss may be more likely to be a contender, but I have cut the power using the same breaker before without incident. My thinking is this - either the EEPROM just "corrupted itself" which seems unlikely, despite possible brownout, since there was definitely no write happening, and the fact that the corrupt data was 14 times 0xAE. Second possibility - I have a routine in the code which copies a block of RAM to EEPROM. It takes the RAM address in FSR, EEPROM address in EEADR and length in w. If my program counter went awol and hit this code with random values, anything could have happened, although that would suggest that there was a block of ram with the same 0xAE bytes, which also seems unlikely. I have since decided to modify the routine so that the calling code sets WREN or something to minimise the effect of this code being run when it shouldn't. Does anyone have any thoughts on what could have caused this? BTW code memory was untouched, and once I had written sensible values back to the EEPROM, all was ok. Thanks for any ideas, Simon. --- -- 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