2
\$\begingroup\$

My code is about button counter .which appear on lcd 2x16 .pic18f46k20 .i want when i turn power off and turn on it again it should show the last number it count . how to make data saved in pic and lcd when i turn off the power?

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

You could add non volatile memory to your project, but I think that would be overkill since the amount of space would be more than necessary. You could also write the data to EEPROM, but since there are a finite number of writes to it, I don't know if you would want to use it. Third option, you could add a real time clock, just to keep the memory alive. You would still keep it powered, but just in a sleeping state so the memory is retained.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.