Shop OBEX P1 Docs P2 Docs Learn Events
Programming-Variables — Parallax Forums

Programming-Variables

ArchiverArchiver Posts: 46,084
edited 2001-01-19 22:37 in General Discussion
I have run into a programming problem. I have too many variables in my
program. I have connected a DS1620 Digital Thermometer, DS1302 clock, matrix
keypad, and LCD to the BSII. I still have two other sensors to add (I am
building a sprinkler system) and have already exceeded 26 variables. The
program I am writing will allow user input from the keypad to set high/low
temps, and five running times with 4 variables for each time, etc. Is there
any way to get around this without adding more EPROM? Could I possibly run
the thermometer portion first to set the variables initially and then
eliminate the unnessecary variables when I integrate the thermometer program
with my main program? I am sending attachments showing the programs we will
be modifying and integrating into our main program. Thank you.
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-01-19 19:00
    [font=arial,helvetica]In a message dated 1/19/01 11:32:15 AM Central Standard Time,
    thealchemist79@hotmail.com writes:


    I have run into a programming problem. I have too many variables in my
    program. I have connected a DS1620 Digital Thermometer, DS1302 clock,
    matrix
    keypad, and LCD to the BSII. I still have two other sensors to add (I am
    building a sprinkler system) and have already exceeded 26 variables. The
    program I am writing will allow user input from the keypad to set high/low
    temps, and five running times with 4 variables for each time, etc. Is there
    any way to get around this without adding more EPROM? Could I possibly run
    the thermometer portion first to set the variables initially and then
    eliminate the unnessecary variables when I integrate the thermometer
    program
    with my main program? I am sending attachments showing the programs we will
    be modifying and integrating into our main program. Thank you.



    You may consider storing data in EEPROM (data statements). ·This will allow
    you to ·pre-set data using the Stamp's DATA statement. ·Since you're only
    dealing with one element at a time, you can read it out of EEPROM, modify it,
    then write it back. ·This technique will probably free a bunch of variable
    space.

    -- Jon Williams
    -- Dallas, TX[/font]
  • ArchiverArchiver Posts: 46,084
    edited 2001-01-19 22:37
    >program I am writing will allow user input from the keypad to set high/low
    >temps, and five running times with 4 variables for each time, etc. Is there
    >any way to get around this without adding more EPROM? Could I possibly run
    >the thermometer portion first to set the variables initially and then

    Yes. You could setup the 1620 with a separate program ahead of time.

    Carl
Sign In or Register to comment.