eeprom data
jonykk
Posts: 17
Hi there,
I would like to ask about the eeprom data storage.. If i store my data in program slot 8. When i wana to compare the reading with the data i stored into the program slot 8. How do i call out the previous reading i write? Do i need to "READ 0, Word voltageReference" at subprogram 1?? Thank you....
subprogram 0:
STORE 8
WRITE 0, Word voltageReference
subprogram 1:
If (currentMeasurement = voltageReference) then
HIGH 1
ELSE
HIGH 2
ENDIF
I would like to ask about the eeprom data storage.. If i store my data in program slot 8. When i wana to compare the reading with the data i stored into the program slot 8. How do i call out the previous reading i write? Do i need to "READ 0, Word voltageReference" at subprogram 1?? Thank you....
subprogram 0:
STORE 8
WRITE 0, Word voltageReference
subprogram 1:
If (currentMeasurement = voltageReference) then
HIGH 1
ELSE
HIGH 2
ENDIF
Comments
You don't tell us which Stamp you're using, but you've generally got the right concept.
STORE determines which slot the subsequent READ and WRITE act on.
You can test this yourself very easily by writing a short test program and checking the Helpfile in the Stamp programming software.
Cheers