Shop OBEX P1 Docs P2 Docs Learn Events
How to use 8 programs of Basicstamp 2P ? — Parallax Forums

How to use 8 programs of Basicstamp 2P ?

DukeDuke Posts: 21
edited 2005-06-24 15:16 in BASIC Stamp
Hello,

How to use run command run the program in BS2P ?
Can I use all the space in EEPROM store only 1 big program ?
In the editor how to create a sub-program ?

I'm really confuse about these thing its not written in the manual.

Duke..

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-06-24 14:52
    Duke,

    ·· Which manual do you have?· The latest can always be downloaded from our website in PDF format.· The Multi-Slot commands are listed in the manual.· You can look up such commands in the Help File as well.· The commands include; RUN and·STORE.· Please see these commands in the Help File and/or BASIC Stamp Manual.

    ·· There is also a Nuts & Volts Column written by Jon Williams which discusses Multi-Bank Programming techniques.· It can be downloaded by going to our website under Downloads\Nuts & Volts Columns\Volume 3\Column #87.

    ·· The short answer to your question about one large program is, no.· You cannot make a program that uses up all 16K of the EEPROM.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • DukeDuke Posts: 21
    edited 2005-06-24 14:56
    I have problem, there is not enough space to store my program
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-06-24 15:16
    Duke,

    Using multiple program slots for RUN is in fact in the manual, but it's a little subtle and most people just gloss over it.· Here's the trick (explained in Chapter 3): You tell the editor which programs to load in the respective stots with the $STAMP directive.· The program that contains the multiprogram directive will be loaded into slot 0 (main slot).· If, for example, you had a mutlifunction robot you could put a menu into slot zero, a line follower program in slot 1, and a soda-can locator in slot 2.· Given that, your slot 0 (menu) program declaration would look like this:

    ' {$STAMP BS2p, LineFollow.BSP, CanLocate.BSP}

    Make sense? LineFollow.BSP will be loaded into slot 1; CanLocate.BSP will be loaded into slot 2.· What this means, of course, is that your multiprogram directive could have up to seven programs specified:

    ' {$STAMP BS2p, Slot1.BSP, Slot2.BSP, Slot3.BSP, Slot4.BSP, Slot5.BSP, Slot6.BSP, Slot7.BSP}

    This Nuts & Volts reprint may help: http://www.parallax.com/dl/docs/cols/nv/vol3/col/nv87.pdf

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
Sign In or Register to comment.