Thanks Bob. I do best of 3, but perhaps best of 5 is better. The corrupti= on I was seeing...not sure if it was EEPROM corruption or something over wr= iting in RAM. But none the less, good advice --- On Fri, 10/9/09, Bob Axtell wrote: > From: Bob Axtell > Subject: Re: [PIC] 16F88 EE Corruption? > To: "Microcontroller discussion list - Public." > Date: Friday, October 9, 2009, 6:56 PM > alan smith wrote: > > Bob, > > > > Can you elaborate on your method of refreshing?=A0 > Or a link to what Microchip recommends?=A0 This may be > one of my problems I have been fighting with a client. > > > >=A0=A0=A0 > Alan, sorry I didn't answer sooner, I've been busy. > = > I have done this many times, and it works perfectly, on > PIC16F88/87, = > PIC16F877A, a few newer PIC18's. > = > I write the data 5 times, instead of just once. I don't > bother to jump = > all over the array, I simply write 5 times in a row with > the same data. > = > When I read, I read 5 bytes instead of just once. I then > check all 5 to = > see if they are the same. > A. If all=A0 5 are the same, I use the value and do > nothing. > B. If all 5 are NOT the same, I locate at least 3 that ARE > the same, and = > use that as the "value", but I > then rewrite ALL 5 anyway. > C. If worse than best 3 of 5, the data must be considered = > defective....but I have never had that experience, EVER. > = > The advantage over Microchip's total rewrite scheme is that > this method = > (1) only refreshes the cells that NEED to > be refreshed, and (2) doesn't needlessly reduce overall > cell life. Think = > about it...why overstress cells=A0 that are working > fine? > = > = > Aside to the List: > = > This brings up a point that Olin and others are trying to > make... = > sometimes Microchip gives some bad advice, like the > open outputs to GND. Well here is another one. > = > --Bob A > = > > --- On Mon, 10/5/09, Bob Axtell > wrote: > > > >=A0=A0=A0 > >> From: Bob Axtell > >> Subject: Re: [PIC] 16F88 EE Corruption? > >> To: "Microcontroller discussion list - Public." > > >> Date: Monday, October 5, 2009, 7:57 AM > >> Sean Breheny wrote: > >>=A0 =A0=A0=A0 > >>> Bob, > >>> > >>> Do you have more information about this? My > reading of > >>>=A0 =A0 =A0=A0=A0 > >> the Mchip docs > >>=A0 =A0=A0=A0 > >>> suggests that the problem is not reads but > writes to > >>>=A0 =A0 =A0=A0=A0 > >> one cell > >>=A0 =A0=A0=A0 > >>> affecting other cells in the array, so that > writing > >>>=A0 =A0 =A0=A0=A0 > >> address 0 and then > >>=A0 =A0=A0=A0 > >>> writing address 1 10,000 times, if I try to > then read > >>>=A0 =A0 =A0=A0=A0 > >> address 0, I may > >>=A0 =A0=A0=A0 > >>> get garbled data - so I need to make sure the > refresh > >>>=A0 =A0 =A0=A0=A0 > >> address 0 after > >>=A0 =A0=A0=A0 > >>> every N writes to any cell in the array. In > other > >>>=A0 =A0 =A0=A0=A0 > >> words, if I simply > >>=A0 =A0=A0=A0 > >>> write data once, I should then be able to read > it > >>>=A0 =A0 =A0=A0=A0 > >> indefinitely with no > >>=A0 =A0=A0=A0 > >>> further refreshes. > >>> > >>> Sean > >>> > >>>=A0 =A0 = > >>>=A0 =A0 =A0=A0=A0 > >> I thought this was settled years ago; the PICforum > and the > >> PIClist = > >> should all have archives on it. > >> Trust me, if you did nothing but read EEPROM data > >> repeatedly, in a few = > >> days, the data will be > >> corrupted, regardless of where it is in the array. > And yes, > >> there=A0 is = > >> interaction with other data > >> in close proximity.=A0 The read process, like > the write > >> process, slowly = > >> erodes the data, as does > >> other lesser-occurring effects, such as radiation, > cosmic > >> rays, heat, etc. > >> > >> In years past, PICs were made with thicker > interconnections > >> and better = > >> isolation for the EEPROM > >> arrays, and errors in EEPROM data was almost > unheard of. > >> But as the = > >> devices have become smaller > >> and the protection less, the "dark side" of > smaller die > >> sizes begins to = > >> show up. > >> > >> Refresh it en masse as Microchip recommends, or > use my > >> "best of" = > >> algorithm and refresh it as needed. > >> My algorithm just increases cell life. > >> > >> --Bob > >> -- = > >> http://www.piclist.com PIC/SX FAQ & list archive > >> View/change your membership options at > >> http://mailman.mit.edu/mailman/listinfo/piclist > >> > >>=A0 =A0=A0=A0 > > > > > >=A0 =A0 =A0=A0=A0 > > > >=A0=A0=A0 > = > -- = > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > = = -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist