stored variables
Earl Foster
Posts: 185
I am trying to read/write a variable from/to a specific memory location that will be retained when there is a power cycle or reset.· The variables will change throughout the life of the program so I figure I can assign a seed value the first time and then read and write the changing·variable there after.· What is the best approach to accomplish this task?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
WWW.HAPB.NET
"Don't ask yourself what the world needs - ask yourself what makes you come alive, and then go do it." - H.T.Whitman
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
WWW.HAPB.NET
"Don't ask yourself what the world needs - ask yourself what makes you come alive, and then go do it." - H.T.Whitman
Comments
Andy Lindsay wrote an excellent description on how to do this very thing. The only caveat is that if you re-program from the Propeller IDE, then the EEPROM locations value will be lost. But even then if you substitute a larger EEPROM and write to the upper 32K then even a Propeller IDE download can't touch this area of EEPROM ... only the EEPROM object within the Propeller can see it.
Check out this link Andy Lindsay wrote:
http://forums.parallax.com/forums/default.aspx?f=25&m=219237
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 3/28/2009 5:49:56 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
WWW.HAPB.NET
"Don't ask yourself what the world needs - ask yourself what makes you come alive, and then go do it." - H.T.Whitman
I apologize... I misread your post. For some reason the "...off-chip EEPROM or equivalent" didn't register with "...surviving a Propeller power down or reset".
I edited my earlier post
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
WWW.HAPB.NET
"Don't ask yourself what the world needs - ask yourself what makes you come alive, and then go do it." - H.T.Whitman