Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] Re: ATmega88PA EEPROM Memory Life

2012-12-12 by Martin McKee

All certainly possible, though your user would have to be quite the busy
body to cause real issues... Let's see, if the dimmer is to be used every
day for eight hours and said user "fiddles" every 30 seconds ( assuming
that there is a timeout so that things are not saved while it is being
actively adjusted ), that would be 960 changes per day, and a single EEPROM
location would last for 104 days.

Of course, if the program does not do any waiting and stores on EVERY
change, it certainly would take a much shorter time to wear things out (
and yes, an explicit timeout could allow for a power outage at just the
wrong time to disallow "proper" restart at the right value ).  Using two
bytes of data, the value and a counter it is simple enough to do wear
leveling.  Using 128 pairs( 256 bytes ), our hyperactive user could twiddle
the dimming level to his heart's content for 36 years!

Martin Jay McKee

On Wed, Dec 12, 2012 at 4: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]
>
>  
>


[Non-text portions of this message have been removed]

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.