Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

What is the way to protect data in EEPROM on bad power suppl

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive
View previous topic :: View next topic  
Author Message
EDC

Bascom Expert



Joined: 26 Mar 2014
Posts: 978

poland.gif
PostPosted: Tue Sep 23, 2014 9:41 am    Post subject: What is the way to protect data in EEPROM on bad power suppl Reply with quote

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
View user's profile Visit poster's website
MWS

Bascom Member



Joined: 22 Aug 2009
Posts: 2264

blank.gif
PostPosted: Tue Sep 23, 2014 10:22 am    Post subject: Re: What is the way to protect data in EEPROM on bad power s Reply with quote

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
View user's profile
EDC

Bascom Expert



Joined: 26 Mar 2014
Posts: 978

poland.gif
PostPosted: Tue Sep 23, 2014 11:02 am    Post subject: Reply with quote

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 Very Happy
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
View user's profile Visit poster's website
Evert :-)

Bascom Expert



Joined: 18 Feb 2005
Posts: 2158

netherlands.gif
PostPosted: Wed Sep 24, 2014 9:35 pm    Post subject: Reply with quote

Nice to see your using (parts of) my code Very Happy
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
View user's profile Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum