Hi Peter, The write attempt counter seems awfully high to me which can hasten EEPROM endurance problems if reads are problematic. Perhaps a retry count of 4 might be more reasonable *until* you know for sure what the problem is. Do you think that during the development of the code that you stressed the endurance of the EEPROM? Let's just assume, for example, that during the development/testing phase of your code that the read routine was not working properly. If the read routine is not working properly, each time a call to EEPROM write takes place the addressed EEPROM location gets written to 2000 times. Fifty calls to this routine and you're already up to 100K write cycles. Again, all of this based on the aforementioned assumption which could be totally wrong. Just throwing a different angle on it. Have you tried a different PICmicro? Have you verified the EEPROM read routine with known data programmed into the PIC with a device programmer? Best regards, Ken Pergola -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Peter Anderson Sent: Monday, September 01, 2003 2:50 PM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC:] 18F1320 Data EEPROM Sorry. http://www.phanderson.com/PIC18F1320_eeprom.html PHA --- "Jan-Erik Soderholm XA (TN/PAC)" wrote: > Peter Anderson wrote: > > I have been tearing my hair (not much to pull) out > with > > writing to the PIC18F1320s Data EEPROM. > > I finally went to a routine which repeatedly > writes and > > reads until the two agree. However, this is > taking up to > > 85 retries and although I now have a working > solution, it > > is really only working on my bench and I am not > comfortable > > fielding the product. I must be missing the > obvious. > > > I have posted the code here > > Where is "here" ? > Or was there earlier posts in this thread I'v missed > ? > > > I am aware of a silicon errata relating to reading > EEPROM, > > but this doesn't seem to be my problem. > > Any help would be greatly appreciated. > > Peter H Anderson, > pha(at)phanderson.comhttp://www.phanderson.com > > > Jan-Erik. > > -- > http://www.piclist.com hint: The PICList is archived > three different > ways. See http://www.piclist.com/#archives for details. __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.