non volatile memory

I am wondering how to save a variable's value in case of power reset.
I am creating a program to write to a display and I want to keep track
of the selection that the user made before the system power went
down and got reset. How can I do this?

Thanks for any help, Vida

Parents
  • The other thing to do is just store the value in EEPROM or Battery backed ram when it is changed. This saves the complications of implementing a power fail interrupt. On power up, just read the value(s) from the non-volatile device. If the device is an EEPROM or FLASH, just make sure there is enough capacity in the power supply to keep the VCC on long enough to complete the write operation.

Reply
  • The other thing to do is just store the value in EEPROM or Battery backed ram when it is changed. This saves the complications of implementing a power fail interrupt. On power up, just read the value(s) from the non-volatile device. If the device is an EEPROM or FLASH, just make sure there is enough capacity in the power supply to keep the VCC on long enough to complete the write operation.

Children
More questions in this forum