Shop OBEX P1 Docs P2 Docs Learn Events
Moving from BS2 to BS2e — Parallax Forums

Moving from BS2 to BS2e

Hi guys my name is arthur, Ii have been using the basic stamp v2 for 5 years now and am happy now as when i found out about it,
(or perhaps more) altho my project has grown so I am moving to the BS2e processor but I am having some difficulty understanding
some differences, I will list them and would be very happy for any input, I also know that this is a processor and not a pc but my
understanding is based on high level languages like Visual Basic 6 and harbor version of CA Clipper

my project will now use slots 0,1,2,3 and I have successfully wrote programs and uploaded them to the BS2e so configuration is not an issue
if i am running in power up slot 0 and issue command write 0, 7 and then run 1, it should be moved to slot one
if my first command after variable init, is read 0, InVar am I reading the same eprom location or does it move to another eprom space when slots are switched

is it possible to just call a subroutine from another slot (my guess would be nope)

and I assume that scratch pad ram is volatile and will be lost on power cycle but not slot switch

my needs are this to be able to have what ever slot I am in to access the same nonvolatile memory space
also i cannot not control power loss with out additional circuitry, as the is a project for vehicle installation
connected to communications equipment

Thanks in advance Arthur ...

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    Arthur,

    Reads/writes to EEPROM are always the current slot. So if you switch slots the data you wrote in a different slot isn't accessible. The BS2p series can read across slot, however.

    You cannot call subroutines across slots. Essentially you're running a new program in a different slot. However if you declare your I/O pins, constants and variables the same across slots those things will remain intact.

    SPRAM is lot when power is removed.

    You should probably check out the following article as well: https://www.parallax.com/news/2016-05-20/bs2-substitution-recommendations-eol-sx-based-basic-stamp-microcontroller-modules
  • thanks for the quick reply ...
    If scratch pad is available i hope i can write there then switch slots and grab the same data
    i just will have to write it more often into both slots eeprom space in case of power loss

    normally the project just sits there and waits for input buy using a keypad when someone enters
    a digit 0 - b it is processed and stored then beak to waiting, it writes less than 100 times per day

    do you think that might work
Sign In or Register to comment.