Re: [AVR-Chat] ATmega88PA EEPROM Memory Life
2012-12-13 by Brian Dean
Benny, You could also create a simple algorithm to rotate the location through EEPROM, cycling among a large set of possible locations. You could have something like a simple array of locations, where you would start saving your dimmer values at the beginning and each new value gets the next location, when it fills up, you cycle back round to the beginning. You could keep track of which cells are in use by using an impossible dimmer value to mark the next free cell. When you use that cell, you move the marker to the one after. The only run-time cost would be to search the array for the most recent dimmer value which can be found by looking for the next free cell, and the most recently stored dimmer value would be the one just before that one. This would expand your cell write/rewite cycle by however many elements you choose to spread it among. So if you chose a 100 element array, your write cycle count goes up by a factor of 100. Even an array as small as 10 values significantly increases the number of cycles you can have before reaching the hardware limits. -Brian -- Brian Dean BDMICRO LLC http://www.bdmicro.com/
Show quoted textHide quoted text
On Dec 12, 2012, at 6:09 PM, Benny Smith <benny@inch-worm.com> wrote: > Graham, > > Thanks for the answers and ideas. > > I have a digital light dimmer whose intensity level is stored in RAM as an > 8-bit variable. > > When power is removed from the light, I want to save the dimmer level so > that when the light is turned ON again, the dimmer level is restored to its > previous value and the light behaves like an analog light with a dimmer > knob. > > I cannot sense removal of power since the hardware is not in place to do so. > So, I am forced to save the dimmer value "often" enough to remember the last > level before shut-down. > > Of course, I would only save the dimmer level when it changes. A busybody > user might change it a lot, hence my need for a lot of storage cycles in the > EEPROM. > > Benny > > _____ > > From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf > Of bayramdavies > Sent: Wednesday, December 12, 2012 2:17 PM > To: AVR-Chat@yahoogroups.com > Subject: [AVR-Chat] Re: ATmega88PA EEPROM Memory Life > > --- In AVR-Chat@yahoogroups.com <mailto:AVR-Chat%40yahoogroups.com> , "Benny > Smith" <benny@...> wrote: > > > > ... if I wanted to save a byte frequently, > > I could use up the 100,000 cycles at one > > byte address and then switch to another > > byte address to store the next 100,000 > > repetitions of my byte-save operation. > > Sure. And to keep track of how may times you've written and erased the > EEPROM byte you're currently working with, you could keep the count in > EEPROM. Of course, you'd have to write and erase it frequently to keep > up-to-date, but not every cycle, and you could move this count to a fresh > byte by counting its erases in another byte, and so on. > > Maybe you should tell us what you're trying to do and what your restrictions > are rather than having us sanity check half-baked schemes. > > Graham. > > _____ > > size=1 width="100%" noshade color=gray align=center> > > No virus found in this message. > Checked by AVG - www.avg.com > Version: 2013.0.2805 / Virus Database: 2634/5952 - Release Date: 12/11/12 > > [Non-text portions of this message have been removed] > >