Shop OBEX P1 Docs P2 Docs Learn Events
How Do I Run my program to another tab? — Parallax Forums

How Do I Run my program to another tab?

collegenow09collegenow09 Posts: 3
edited 2008-10-19 04:19 in BASIC Stamp
I am currently programming a robot and have run out of memory on EEPROM.· I know that there is a RUN command but i do not know how to put it in my program.· I have read the syntax but it doesnt help me.· I just cant get the other tab to download into the stamp.

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-10-19 02:51
    collegenow09 -

    Which PBASIC Stamp are you attempting to program?

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When all else fails, try inserting a new battery.
  • collegenow09collegenow09 Posts: 3
    edited 2008-10-19 03:14
    I am using a BS2sx.
  • SRLMSRLM Posts: 5,045
    edited 2008-10-19 03:19
    For run, you create another program, and declare that program in the begining of the "main" program (in slot 0). Then you type

    RUN 1

    where 1 is the second program that you've made. To share data, simply use GET and PUT.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-10-19 03:37
    collegenow09 -

    First you need to use the following compiler directive to indicate which slots will contain which programs. Additional information can be found in the PBASIC Help file, or the PBASIC Reference Manual.

    quote

    For BASIC Stamp projects (consisting of multiple programs), the $STAMP directive has an option to specify additional filenames. The syntax below demonstrates this form of the $STAMP directive:

    ' {$STAMP BS2e, file2, file3, ..., file8} (Ed. Note curly brackets!)

    Use this form of the $STAMP directive if a project, consisting of multiple files, is desired. This directive must be entered into the first program (to be downloaded into program slot 0) and not in any of the other files in the project. The file2, file3, etc. items should be the actual name (and optionally the path) of the other files in the project. File2 refers to the program that should be downloaded into program slot 1, file3 is the program that should be downloaded into program slot 2, etc. If no path is given, the path of program 0 (the program in which the $STAMP directive is entered) is used.

    Up to seven filenames can be included, bringing the total to eight files in the project all together. Upon tokenizing, running or viewing program 0 in the Memory Map, the editor will read the $STAMP directive, determine if the indicated files exist, will load them if necessary and change their captions to indicate the project they belong to and their associated program number. After the directive is tokenized properly, and all associated files are labeled properly, tokenizing, running or viewing any program in the Memory Map will result in that program’s entire project being tokenized, downloaded or viewed.

    end quote

    Once that is done, then you can implement the RUN instruction as required.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When all else fails, try inserting a new battery.
  • ercoerco Posts: 20,256
    edited 2008-10-19 04:19
    Have a look at http://www.parallax.com/dl/docs/cols/nv/vol2/col/nv71.pdf

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
Sign In or Register to comment.