Shop OBEX P1 Docs P2 Docs Learn Events
writing to eeprom/scratch help! — Parallax Forums

writing to eeprom/scratch help!

ddoudddoud Posts: 10
edited 2006-02-09 23:09 in BASIC Stamp
Hi-

I'm new to BS programming, but I've gotten the hang of communicating with my projects on the breadboard. What I'd like help with is how to write data to my EEPROM and Scratch pad. Basically, I'm creating a weather balloon and with all my instrumentation (temp, humidity, acceleration, etc...) I'm running out of variable space. I need a way to store a WORD variable to my scratch pad, or eeprom and reference it later - I think. Measurements are only every 5 seconds, so speed isnt really an issue, but I would like to maintain safe programming style, ie writing to the opposite side of the eeprom that my program is on, and so on.

Can anyone help me out here with any advice?

Thanks
d

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-02-09 21:15
    I wouldn't recommend using the EEPROM if you have a BS2p-family module.· To use the Scratchpad, simply decide on a storage location for you value and do this:

    · PUT Storage1, Word myWord1

    Note the use of the Word modifier -- you need this if you want to save a 16-bit variable.· Do note that this still requires two bytes in the Scratchpad, so if you're going to store more than one value you must take this into account.· For example:

    Storage1··· CON···· 0
    Storage2··· CON···· 2
    Storage3··· CON···· 4

    To retrieve a value, use GET:

    · GET Storage2, Word myWord2

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • ddoudddoud Posts: 10
    edited 2006-02-09 21:20
    OK thats clear, I'll try it out.

    Thanks!
  • JonathanJonathan Posts: 1,023
    edited 2006-02-09 21:22
    D,

    Since Jon has answered your eeprom question, I won't go into that. I was wondering about the details of your weather ballon project. I just got given a helium tank by one person, and a 6' weather ballon by someone else, so perhaps it is time for me to do a weather ballon project too.

    So, is it going to be tethered? How high do you expect to send it? What sensors are you using? All details would be most welcome.

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • ddoudddoud Posts: 10
    edited 2006-02-09 21:36
    Hey Jonathan-

    Well, the project is for the University of Michigan high altitude instrumentation course. Basically, we're trying to build a tether free balloon targeted for 120,000ft. This is my first stamp project, so the instrumentation is a little simple - only products from parallax (because of the documentation!) - but they include:
    1. Memsic Accelerometer (to measure the force of gravity, as it decreases with altitude)
    2. Sensirion temp and humidy sensor (should get COLD and dry!)

    I've also got the ds 1302 clock, for time stamping, two circuts that click digital cameras, and I've got to install the heater as descibed above - since the FAA requires that I be able to pop if needed.

    Thats just the instrumentation, we have another guy with a Ham Radio permit working on the radios and modem stuff, and yet another on power systems. If you can wait until the end of April, I'll submit a report to this group and it will cover everything from assembly to test and everything in-between.

    If you have any other questions, shoot them my way for sure!
  • JonathanJonathan Posts: 1,023
    edited 2006-02-09 22:55
    D,

    Please do keep us informed, very interesting. PLease feel free to send information concerning the project to me at: jpeakall@madlabs.info

    What are your recovery plans, if any? Are you going to track its course with GPS to gather wind data?

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • ddoudddoud Posts: 10
    edited 2006-02-09 23:09
    OK Will do.

    Yep, we plan to track it via GPS. I'm not exactly sure how they're doing it, but thats the plan as of now. Right now the recovery plans are to launch in ohio to stay away from water - but beyond that, we're still working on it [noparse]:)[/noparse]
Sign In or Register to comment.