Non-volatile variable
ScottL
Posts: 14
I need to keep the contents of a variable even with the power off. How?· -Scott
Comments
·· How often is the variable being updated?· If only once in awhile like a set point you could store it in EEPROM each time it was changed then load it from that location upon startup.· However if it's changing rapidly in the code you wouldn't want to write it to EEPROM since it would slow the program down and wear out the EEPROM location.· One other possibility was if your hardware included an RTC such as the DS1302 or DS1307 you could store the value in the battery-backed RAM.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
I wanted to add a RTC in but I only have 1 unused I/O pin. Is there a way to multiplex the use of them (hardware wise)?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com