Electronics > Beginners

How to save data when µC power is down?

(1/4) > >>

david77:
Hi guys.

I'm currently designing a real-time counter for an old reel to reel tape recorder.

Now I'd like to save the counter when the recorder is turned off. I'm not sure what the best way to do that is.

My first idea was to keep the µC powered by a 3,6V lithium battery or a NiMH battery so that the contoller
doesn't loose his memory at all.
The second idea was to somehow detect the power-down and make the controller save the counter into
the EEPROM. I'd have to supply the controller with power for a few seconds after power-down, maybe with a
Goldcap.

What do the experts think would be the way to go?

The controller I'm going to use is the ATMega32 as I need loads of I/O for a 4x4 keyboard matrix and
some other signals from the recorders logic circuit that I have to monitor. There's also a LCD connected
to the µC.
In the end I don't only want a counter, I want an autolocator - so I need the keyboard for data input.
I haven't yet built or coded anything, at the moment all I have is in my head and some preliminary circuit
diagrams.

Cheers, David.

Zad:
I would go with the EEPROM method. If the micro doesn't already have a brownout detector then they are cheap enough to buy or build. Given the low power needs of modern micros and speed at which they work, I would imagine the existing power filtering caps would provide enough charge to perform an EE write.

frank26080115:
Did you know the DS1307 RTC chip is also a battery backed non-volatile RAM? Maybe that's one option.

williefleete:
stick in a routine which writes to a 8 pin eeprom regularly if its not to involved or use a battery backed SRAM

david77:
Thanks guys.

What would be the benefit of using an external EEPROM? I don't have to store much data, only a couple of bytes.

Cheers

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod