View previous topic :: View next topic |
Author |
Message |
EDC
Joined: 26 Mar 2014 Posts: 971
|
Posted: Tue Sep 23, 2014 9:41 am Post subject: What is the way to protect data in EEPROM on bad power suppl |
|
|
In my controller, sensor addresses are stored in the EEPROM. Unfortunately, after a storm, when the power supply is interrupted, not for the first time, I have to learn it again. What is the way to protect data in the EEPROM. Wait for the stabilization of the voltage?
Thank you and have a nice day
(BASCOM-AVR version : 2.0.7.7 ) |
|
Back to top |
|
|
MWS
Joined: 22 Aug 2009 Posts: 2262
|
Posted: Tue Sep 23, 2014 10:22 am Post subject: Re: What is the way to protect data in EEPROM on bad power s |
|
|
EDC wrote: | What is the way to protect data in the EEPROM. |
Depends whether EEProm data is only read or if it's written too. In the first case it may be enough to enable Brownout, as it prevents the controller going crazy just before passing out.
In the second case, additional to Brownout, a buffer capacity will help. Monitor the buffer via ADC and do only EEProm-writes, as enough capacity is left to safely finish the write process.
In case the complete circuit draws fluctuating amounts of current, and this way it can't be sure how long the buffer lasts, provide the controller with its own decoupled buffer capacity. |
|
Back to top |
|
|
EDC
Joined: 26 Mar 2014 Posts: 971
|
Posted: Tue Sep 23, 2014 11:02 am Post subject: |
|
|
Thank You. I forgot that possibility. Nothing is written without user, but all strings are read from EEPROM and after storm one of them have letter "R" changed...
I set BODLEVEL and BODEN to zero and waiting for another storm
If this not help I try to re-design like You sugest.
Thank You
PS.In my spare time I build home-page. Yesterday I started working on coloring syntax highlighting Bascom. You can take a look. It's not PHP. This style and Java. If anyone knows a better way let me know. LINK |
|
Back to top |
|
|
Evert :-)
Joined: 18 Feb 2005 Posts: 2156
|
Posted: Wed Sep 24, 2014 9:35 pm Post subject: |
|
|
Nice to see your using (parts of) my code
I can't read Polish but your site looks cool, hope you guys in Poland have fun with RC2 Sound. _________________ www.evertdekker.com Bascom code vault |
|
Back to top |
|
|
|