SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By sdisselhorst
#100809
Is there an easy way to save the memory of the Arduino using a battery backup of some kind? I want to avoid my counters zeroing out from brief power loss. I am powering them with +5v from a regulated power supply tied right to the +5v points on the prototyping board. I also have +12v from the power supply available. I haven't been able to find a good solution anywhere on the web.
By busonerd
#100819
Power supply -> schottky diode -> +5V
Coin cell - >schottky diode -> +5V

Make sure you don't try to run anything but the AVR off the onboard +5V, or your coin cell won't last very long.

--David Carne
By trialex
#100830
Depending on how you are using these variables - i.e. how often they update, you could store them in EEPROM - it is not cleared when power is removed. There is 512 bytes available, and a library to show you how to do it.