Shop OBEX P1 Docs P2 Docs Learn Events
Can you combine 2 PBasic stamp boards together?? — Parallax Forums

Can you combine 2 PBasic stamp boards together??

Jcassell42069Jcassell42069 Posts: 1
edited 2008-10-27 14:16 in BASIC Stamp
I am running source code that prompts me that I am out of VAR space, and i've seen pictures of other boe bots where they have two boards stacked on each other, and am wondering if there's a way to increase the amount of memory or VAR space on my board? I have the robotics with boe bot board, and a HomeWork board... Both with the same BS2 stamp! So can I combine them together to use the memory off of the homework board, or is there any way to increase the VAR space??

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-10-27 01:27
    Not really.

    There is no way to increase the VAR space nor is there any practical way to increase the amount of program space.
    By going to a different Stamp model, you can add other kinds of data storage like the scratchpad ram and you can
    have multiple "slots" of program space, each 2K in size. It's not the same as having a larger program space, but
    you can store multiple programs (like overlays) on a Stamp module and transfer between them.

    In some cases, you can use the program space to store data as long as you don't change it often. There's an
    absolute limit on the number of times you can write to any given location in program space, so they'll wear out
    eventually. It's about 100,000 times.

    The BoeBots you've seen probably share the work in that one BOE handles some sensors and some processing
    while the other BOE handles the servo and maybe some of the sensors and communicates with the "slave" BOE
    to get its sensor information.

    Variables (VARs) can often be shared since a given variable is often used only in a particular subroutine and
    nowhere else. If there are two such variables and the subroutines don't overlap in usage, the same variable
    can be used in both subroutines. Rather than using the same name, you can make one name an "alias" of
    some variable. Look in the manual under "alias".

    Post Edited (Mike Green) : 10/27/2008 1:32:44 AM GMT
  • kevinb2050kevinb2050 Posts: 56
    edited 2008-10-27 01:34
    Have a look in the basic editor under SEROUT "example page"- it shows how to hook 2 stamps togeather. I have a BS2e and a BS2 working this way.
    If you are out of Var space you will need to split your program i.e. have 1 stamp as the main that calls the slave with selected routines.
    There is an error in the editor description, if you do a search on this forum you should find it - I think it was the pins in the program were back to front on the slave program example
  • Mike GreenMike Green Posts: 23,101
    edited 2008-10-27 02:30
    Do not post duplicate messages. It is against forum rules. Please delete the one in the Robotics forum. Use the X icon in the upper right hand corner of the message box.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-10-27 14:16
    Your duplicate post in the Robotics Forum has been removed. Cross-posting is not allowed on the forums.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
Sign In or Register to comment.