How to use 8 programs of Basicstamp 2P ?
Duke
Posts: 21
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..
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
·· 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
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