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

Unable to WRITE data to eeprom

robo-skwerlrobo-skwerl Posts: 1
edited 2014-05-07 17:16 in BASIC Stamp
Greetings!

I am collecting data from my boe-bot which is wired as a light meter.
I can upload my program from BASIC Stamp, but I can't write data to the eeprom.

As you can see below, I am trying to write bytes and words to the eeprom, but nothing is showing up.
The program executes and the debug screen shows all the data as it is collected.

If you see my problem, please let me know how to fix.

Thanks!

robo-skwerl




'{$STAMP BS2}
'{$PBASIC 2.5}

time VAR Word

eepromAddress VAR Byte

DEBUG "Starting Measurements...", CR, CR,
"Measurement Value", CR,
"

", CR

PAUSE 1000

FOR eepromAddress = 0 TO 58 STEP 2

HIGH 2
PAUSE 5000
RCTIME 2,1,time
DEBUG DEC2 eepromAddress,
" ", DEC time, CR
WRITE eepromAddress, Word time

NEXT

DEBUG "All Done. Now, run:", CR,
"part 3.bs2"

END

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2014-05-04 15:40
    There's nothing wrong with the WRITE statement. Are the values displayed with the DEBUG statement correct? What program are you using to read the data from the EEPROM?
  • GenetixGenetix Posts: 1,749
    edited 2014-05-07 17:16
    That looks like StoreLightMeasurementsInEeprom.bs2 from What's a Microcontroller.
    In What's a Microcontroller, ReadLightMeasurementsFromEeprom.bs2 is used to retrieve the data.
    Both are in Chapter 7.
Sign In or Register to comment.