Hi
I am trying set up a function that when for example P1 is set to 200 within the program via a user setting function., it stays there when unit is turned of and then back on. I am using a 16F690. How can I do this please.
Cheers
JOHN
Change of values
Moderator: Benj
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
Re: Change of values
Store the value in EEPROM. Read it at startup of the program and write a new value when it is provided by the user. Use an additional byte of EEPROM storage with a special value to indicate there is a stored value to prevent using uninitialized EEPROM data the first time your program runs.
In these messages a similar problem is addressed.
In these messages a similar problem is addressed.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis