It doesn't sound like you have any brownout protection. During a brownout, the PIC is running but RAM is scrambled: this means the PC can contain a random address, and execution can jump into the middle of your EEPROM write code. On Wed, 4 Oct 2006, Bob Axtell wrote: > I'm getting some strange results with an application that powers on/off > a low-end PIC repeatedly (about once per second): the EEPROM > is getting scrambled randomly. > > The application reads something out of the EEPROM and sends data > out. All signal and power lines are clamped with low-voltage varistors > and the power is applied from another PIC several feet away. Yet before > the night is over, the EEPROM is scrambled. Yes, there IS code to > write to EEPROM in the data space, but it is never actuated, in fact has > been prevented from writing to the EEPROM.. > > It seems that the device is powering up and running out of the wrong data > space. The device is a PIC12F629 in SOIC8. The code simulates perfectly > (never jumps to wrong area in MPLAB 7.41) and otherwise works perfectly. > Uses config: internal RC, WDT ON, Pwrup Timer ON, Brwn OFF, Mclr EXT > (but has 22K pullup). > > Anybody ever seen anything like this before? I am very perplexed... > > --Bob > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- John W. Temples, III -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist