Retaining User Settings In EEPROM
Mike Keitz email (remove spam text)
On Sun, 12 Sep 1999 23:09:19 +0100 David J Binnington
<DJBELECT.KEME.CO.UK> writes: david
>All user inputs are by button presses with
> auto-repeat on some.
Write the new values when the user releases the button. This prevents
constant writes because of autorepeating but also has an immediate
update. Unless you're storing data for more than one button in an EEPROM
byte the buttons should wear out before the EEPROM will.
I like to always get working data from the EEPROM right when needed.
That way there's no need to copy the EEPROM to RAM on power-up or deal
with a possible discrepancy between the two. But it may be a problem
with your scheme if the user is expecting to be working with a "live"
value while updating. If you don't write to the EEPROM until after the
button is released, any program running in the background would use the
old values. Also the EEPROM is unavailable for reading during a write.
It is more likely for a glitch to upset a RAM value than EEPROM. So your
scheme of writing RAM values to EEPROM whenever they differ is going to
be kind of susceptible. I'd have the EEPROM writing routine only run if
the user is pressing buttons to change the settings.
Get the Internet just the way you want it.
Free software, free e-mail, and free Internet access for a month!
Try Juno Web: dl.http://www.juno.com/dynoget/tagj.
See also: www.piclist.com/techref/mems.htm?key=eeprom
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the