Shop OBEX P1 Docs P2 Docs Learn Events
eeprom data — Parallax Forums

eeprom data

jonykkjonykk Posts: 17
edited 2012-05-20 04:07 in BASIC Stamp
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

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2012-05-20 04:07
    Hi,

    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
Sign In or Register to comment.