I am now resetting using "asm volatile (" jmp 0"); and it works but I would like to leave the variables as is. I want to leave the LCD backlight off. I can supply the code if necessary.
Thanks, Bill
I am now resetting using "asm volatile (" jmp 0"); and it works but I would like to leave the variables as is. I want to leave the LCD backlight off. I can supply the code if necessary.
Thanks, Bill
Hi Bill,
That may be tricky, depending on the scope some variables are set to zero automatically, and others will have different content (i.e. non-zero).
However, one option is to write your data to EEPROM, which of course is persistent even after power loss.
Is there a reason you wish to reset? Ordinarily you'd never do that (unless a software failure was detected, e.g. using a watchdog timer)
or some rare scenario like a software upgrade. (normal practice is to never allow have the microcontroller to reset or exit).
The display sets idle for a long time (hours) then when a keypress happens, the backlight comes on until the current function completes.
Thanks for the thought.
The display sets idle for a long time (hours) then when a keypress happens, the backlight comes on until the current function completes.
Thanks for the thought.