[sdiy] Retaining button state after power off?

Ove Ridé nitro2k01 at gmail.com
Sun Feb 2 01:56:51 CET 2014


On 1 February 2014 08:34, Ullrich Peter <Peter.Ullrich at kapsch.net> wrote:
> Yes, an ATTiny35, 45 oder even 12 or 13 could do the job also quite nice, but you have to take care of the maximum write endurance... If you have lots of writes then the FRAM based MSP430 types could help... Nearly unlimited writes possible there...
>

The ATTiny EEPROM is speced at 100k write/erase cycles, possibly more
than the switch. With some clever programming, you could also program
one byte at a time, so you'll only consume one write/erase cycle per,
say 256 writes, for a 256 byte EEPROM device. You start from the fully
erased state, then for each button press, you write 00 to the next
available byte in EEPROM. The state is the number of 00 bytes mod 4.
When all bytes are 00 and the user presses the button again, the
program issues an erase. That should give you an expected 25.6 million
button presses.

Depending on whether byte writes always go through an erase cycle,
even if there are only 1->0 transitions, this method could be extended
to individual bits for even more extended endurance. (But if the
EEPROM needs/performs an erase cycle for any write, even only 1->0
transitions, this particular method doesn't improve anything.)

-- 
/Ove

Blog: <http://blog.gg8.se/>

"Here is Evergreen City. Evergreen is the color of green forever."



More information about the Synth-diy mailing list