Exo said:
The Real MicroMan said:
in your code, just don't set the intiial value. as long as you don't change it in your code. it will still be there. Think of it this way your program memory stays, so shall any register you changed.
Not true. All normal RAM files are just like the ram in your computer. When power is removed all data is lost. program memory stays because it is eeprom or flash memory.
You should save the file to EEPROM when it is changed and get it out of EEPROM every time the pic powers up.
example: For those of you who don't know anything about Micros
int help;
main()
{
printf("%c", help);
help=getc();
}
if I run this program and enter "f" as my getc(), then disconnect power, after I reconnect power help will still be "f".