Renaming Variables
Lucas Harlem
Posts: 5
In response to my last post about EEPROM, I have a way around using it, but these variables are not responding.
MM Var Byte 'Current Month Variable
LM Var Byte 'Previous Month Variable
Month:
AUXIO
SEROUT 0\1, 16468, [noparse][[/noparse]M7]
LM = MM 'I need to copy the value stored in Variable MM into the Variable LM but not make them equal to each other.
MM = 0 'I need to clear this variable without changing the previous value that is stored in LM.
GOTO start 'I am aware that this says to go to start, and not month, it is correct, it does not goto month.
When the stamp is reset, not powered off, just rest, are variables lost?
I am trying to avoid using EEPROM, is this possible in this scenario, because when I run the program the variables are not copying.
I did look at the alternatives to using the stamps EEPROM posted by other members in the previous post, and they were very helpful, I would rather use external eeprom rather than the stamps eeprom.
Thanks
L. Harlem
MM Var Byte 'Current Month Variable
LM Var Byte 'Previous Month Variable
Month:
AUXIO
SEROUT 0\1, 16468, [noparse][[/noparse]M7]
LM = MM 'I need to copy the value stored in Variable MM into the Variable LM but not make them equal to each other.
MM = 0 'I need to clear this variable without changing the previous value that is stored in LM.
GOTO start 'I am aware that this says to go to start, and not month, it is correct, it does not goto month.
When the stamp is reset, not powered off, just rest, are variables lost?
I am trying to avoid using EEPROM, is this possible in this scenario, because when I run the program the variables are not copying.
I did look at the alternatives to using the stamps EEPROM posted by other members in the previous post, and they were very helpful, I would rather use external eeprom rather than the stamps eeprom.
Thanks
L. Harlem
Comments
You must write the variables which you want to save through a reset to EEPROM. All memory, and all variables are cleared when the program is loaded, and this is the condition upon restart (reset).
Regards,
Bruce Bates
kelvin
What is the reason you don't want to use the stamps eeprom?
Values like month and previous month should be able to be calculated at any time if you store the months names (if thats how you want to recognise them)in an array. The index could also be used as an identifier. eg 1 Jan 2 Feb 3 Mar etc..
As those names are more than one value i.e. three letters perhaps it would be necesary ·to multidimension the array. If that is possible with the stamp?
Then current month could be the current index value and previous month would be current index - 1.·Just read the string then for the name.
I am new to this and my suggestion may of be no help but I feel like I should try and give something back as I have received help here myself from kind people.