Shop OBEX P1 Docs P2 Docs Learn Events
BS2e — Parallax Forums

BS2e

hmlittle59hmlittle59 Posts: 404
edited 2007-12-02 04:52 in BASIC Stamp
Hello everyone,

I'm having one hec of a time cramming all my code into my BOE. There is future up grades that just will not fit like.

BIG Question???

BS2e released in NOV. 07.

Should I just switch to the new board and save some sleepless nights?

1) Can I just move my code over and not miss a beat?
2) Will the extra ram have to be switch in or out to use?

thanks for any help

hmlittle59

Comments

  • Tracy AllenTracy Allen Posts: 6,664
    edited 2007-12-01 16:43
    I'm not sure what you are referring to with "BS2e released in NOV. 07". The BS2e has been available for quite a few years. You should also seriously consider the BS2pe, which has not only more memory but also several more useful commands. Or the faster BS2p or BS2px.

    However, the timing of instructions on the BS2e is exactly the same as on the original BS2, so with that one you can move the code over and truly not miss a beat. On the 'pe there are a few small timing differences you might have to adjust, but it shouldn't cause you a sleepless night. Almost everything is exactly the same between the BS2, BS2e and BS2pe.

    The main program RAM is the same on all the chips, 26 bytes of general purpose storage for variables. But the BS2e and BS2pe have an additional scratchpad RAM that is good for temporary storage. They also have more eeprom for programs and data. And yes, have to switch from slot to slot to use it. In the BS2, you have 2048 bytes for your program and data. In the BS2pe that is expanded to 8 * 2048 bytes for program and data + 8 * 2048 bytes for additional data. That extra eeprom is organized as separate slots of 2048 bytes each, and your program will have to use the RUN and STORE commands to move between them. You will have to stay up late and learn how it works!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • Mike GreenMike Green Posts: 23,101
    edited 2007-12-01 16:53
    You may be able to write your program more efficiently and same some space. For example, there may be things that are repeated over and over again with only slight variations. You may be able to rewrite that portion as a subroutine. If you have a lot of messages with a lot of text in them, the BS2p/pe/px has a STORE statement that allows you to READ and WRITE from slots other than the one where the program is executing. You could move all the messages to other slots using DATA / READ / WRITE and a subroutine to output the message given a number.
  • SandgroperSandgroper Posts: 62
    edited 2007-12-02 04:52
    I use a BS2-e.· In a nutshell - the BS2-e has 8 pages of code space, plus the scratchpad RAM.·

    If you use more than one code page, make sure that you keep similar variable declarations on each page, otherwise it will produce unpredictable results.·

    The scratchpad RAM can be used for passing variables between code pages.· SPRAM works in byte-sized chunks, but it can also accept word sized variables by using the WORD modifier.· It's a great way to store temporary variables on the fly without having to·save to·eeprom.

    If you haven't already done so, take a look at the command set in the PBasic Syntax Guide.··It shows which commands are common to each chip and what some of the differences are.
Sign In or Register to comment.