Page 1 of 1

Change of values

Posted: Thu Aug 22, 2013 1:36 am
by jbs4wd
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

Re: Change of values

Posted: Thu Aug 22, 2013 6:46 am
by kersing
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.

Re: Change of values

Posted: Wed Sep 11, 2013 12:22 pm
by jbs4wd
Thank you. That kicked the thought bubble into action

John