Hey
Wondering if anyone can help,
Im saving some values into EEPROM for example write 0,b6. So writing the value of b6 into location 0. B6 can then change,I'm using EEPROM so I don't lose the value when the circuit is turned off. But then I want to compare the value of EEPROM location 0 with b6 later on so I am reading the original value back into b14, using read 0,b14. Then comparing the new b6 with the original value of b6 which is now in b14. Im wondering if I can directly compare a variable with an EEPROM value without having to read it into a variable. The part of code/pseudo is as follows,*
B6 receives a value
Write 0,b6 'store b6 in location 0
Period of time*
B6 recieves another value
Read 0,b14 'read location 0 into b14
If b6 = b14 then 'compare the original value with the new value
'Code here
End if.*
I'm wondering now. Can I do something like if b6 = EEPROM location 0 then....
I'm trying to free up some variables which is why I'm looking for a more direct way, cheers.
Wondering if anyone can help,
Im saving some values into EEPROM for example write 0,b6. So writing the value of b6 into location 0. B6 can then change,I'm using EEPROM so I don't lose the value when the circuit is turned off. But then I want to compare the value of EEPROM location 0 with b6 later on so I am reading the original value back into b14, using read 0,b14. Then comparing the new b6 with the original value of b6 which is now in b14. Im wondering if I can directly compare a variable with an EEPROM value without having to read it into a variable. The part of code/pseudo is as follows,*
B6 receives a value
Write 0,b6 'store b6 in location 0
Period of time*
B6 recieves another value
Read 0,b14 'read location 0 into b14
If b6 = b14 then 'compare the original value with the new value
'Code here
End if.*
I'm wondering now. Can I do something like if b6 = EEPROM location 0 then....
I'm trying to free up some variables which is why I'm looking for a more direct way, cheers.