Shop OBEX P1 Docs P2 Docs Learn Events
Please help. How do I use the entire 8 x 2K EEPROM program size inside only on — Parallax Forums

Please help. How do I use the entire 8 x 2K EEPROM program size inside only on

bytor95bytor95 Posts: 53
edited 2006-09-12 17:29 in BASIC Stamp
Hi,

I'm feverishly creating a marine tide calculator using the BS2SX and the um-fpu coprocessor. I'm dying to use the entire 8 x 2K = 16K program size in one program.

The document states:

For BS2e, BS2sx, BS2p, BS2pe, and BS2px programs, each editor page can be a separate project, or part of a single project. A project is a set of up to eight files that should all be downloaded to the BASIC Stamp for a single application. Each of the files within the project is downloaded into a separate "program slot". Only the BASIC Stamp 2e, 2sx, 2p, 2pe, and 2px modules support projects (multiple program slots).


Notice it says "or part of a single project". So my question is how do I use the entire program size for one program instead of having only room for 8 separate, 2K programs?


Thanks in advance,

Engin

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2006-09-12 16:27
    You 'chop up' your program into parts, then use the "RUN" keyword to run a part of your program in another 'slot'.
  • bytor95bytor95 Posts: 53
    edited 2006-09-12 16:39
    allanlane5,

    Thanks man. I tried that but I want to be able to share the data I send to the EEPROM with the main section of the program. I calculated that I would need approximately 10K for the tide data and my program part is around 2K. How do I get my main program to "see" the data if it is in another file?

    Thanks again,

    Engin
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-09-12 16:59
    Hello,

    ·· Only the BS2p series modules can read DATA in one slot from another.· For the BS2e/BS2sx the DATA you read would have to reside in the same program slot.· Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Tracy AllenTracy Allen Posts: 6,662
    edited 2006-09-12 17:01
    A Stamp in the BS2P series is much much better for that. It has a command (STORE) that allows you to read and write DATA anywhere in the entire 16kbytes (32k bytes in the case of the BS2pe). That would be a real boon for what you are wanting to do.

    It is not impossible with the BS2sx. You have to write a little program in each bank of the BS2sx that passes the data in a RAM or scratchpad buffer. When a program running in slot 0 needs to retrieve data from slot 7, for example, it RUNs that little routine with a pointer to the DATA location, and the routine transfers the data to RAM or scratchpad, and then RUNs back to slot 0. You have to have a run/return mechanism in place in your program, because the Stamp does not take care of that automatically.

    That said, again, you might want to look at a BS2p, pe or px.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • bytor95bytor95 Posts: 53
    edited 2006-09-12 17:29
    Tracy and Chris,

    Thanks very much. I read your comments and looked everything over and know that you're right. I bought the SX thinking I could combine the programs. I may resort to buying the BS2P or may try using the ram.

    Thanks again guys.

    Engin
Sign In or Register to comment.