There have been many variations of this problem posted here through the years. One of the more common sources of the problem comes about from the power supply not being stable before accessing the nvram. In some cases, users would do writes as part of their initialization code and the code ran fast enough that if the power supply "bounced" or "stuttered" etc. that the nvram could be corrupted. Remedies depend upon the exact nature of each case but some things that help are waiting for a few seconds before executing code that accesses the nvram especially for writes. One particular case involved something like this scenario: -power up -initialize -read nvram -use nvram values -do some code -write result out to nvram If the read got corrupted due to power fluctuations, then the values that get used and subsequently re-written are also corrupted. One person wrote that when they read the nvram, they read it 100 times with a delay and verify that all 100 reads are the same. Others use a checksum. This is all from my memory (not nvram ;>) and you would do well to search the archives. Good luck! Andre Abelian wrote: > Hi to all, > > I am working with PIC18F4550 and I store 8 bytes of data in Data EEPROM. On > Startup pic loads those value and the only time data eeprom values may > change > Is when user will press and hold 2 buttons combination then it will update > data > EEPROM. I started having problem loosing data EEPROM values intermittently I > decided > To have a copy of each byte saved some where else in Data EEPROM as a copy > to compare > With and later I went to customer " in Texas Dallas" I found that Data > EEPROM > First 8 bytes are getting changed all random locations. This is USB device > they only restart the whole > System using small PC. After reading Data EEPROM values I found that > Copy of same data is always stable and after I moved the location to where > the copy bytes are > The system started working well. My question is how is it possible that data > eeprom > Being effect no matter what they do externally. I checked the USB power line > was > Clean ground was ok no thing else to check it is only USB device. > Unfortunately we only had one device > To work with. I use CCS C compiler known to be reliable compiler I use it > very long time. > Any Idea or experience or feedback about data EEPROM getting change will > appreciate. > I know this kind of question is hard to answer but you guys may see it one > day good to know > The reason. > > > Thanks > > Andre > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist