Shop OBEX P1 Docs P2 Docs Learn Events
Converting BS2 code to BS2P24 — Parallax Forums

Converting BS2 code to BS2P24

Robert@HCCRobert@HCC Posts: 80
edited 2006-01-22 04:51 in BASIC Stamp
I am currently using a BS2 to run the components in our CanSat project. Components consist of :
DS1620, DS1302, Memsic 2125, MAX187 ADC, MPX4115 Pressure sensor , uM-FPU FP coprocessor, 25LC640 EEPROM, AeroComm 4790 RF modules, and a LassenIQ GPS module.

We are planning on moving up to a Bs2P-24 ,as I had to disable my EEPROM datalogging code when I added the coprocessor to fit the code in the bs2 eeprom tongue.gif
The coprocessor is actually overkill, I know - but we want to experience working with the widest range of components possible to add to the learning experience.
Additionally, I still have to add a bit of code for the RF and a small bit to control a servo for parachute release/guidance.

Also, we would like to take advantage of the speed boost of the bs2p, as well as the program slots.

My question is, in converting the code from the bs2 to the bs2p, what functions are affected by changing over to the bs2p from the bs2? For instance, I know about changing the scale for the memsic 2125 like so:

#SELECT $STAMP
 #CASE BS2, BS2E, BS2PE
    Scale       CON     $200                    ' 2.0 us per unit
 #CASE BS2SX, BS2P, BS2PX
    Scale       CON     $0CC                    ' 0.8 us per unit
#ENDSELECT




And changing my baud rate constant as well....

Any other potential "gotchas" I should be aware of besides this ?

Aloha, and thanks for any replies!
Robert

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-01-21 15:31
    Any command that is time-oriented -- except PAUSE -- will likely require a parameter adjustment. As you work through the program have a quick look in the help file to see if there's a difference between the BS2 and the BS2p. All of the examples in the help file show how to use Conditional Compilation to allow the adjustment to be automated. I suggest you update the program with CC structures and try it while still running the BS2. When it works the same as your original program, pop in the BS2p and give it a test.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Robert@HCCRobert@HCC Posts: 80
    edited 2006-01-22 03:44
    Thanks for heading me in the right direction, Jon!
    I really just needed to reasure myself it would be fairly easy to make the transfer, so I could reassure my mentor who controls the budget lol.gif

    The cool thing about Conditional Complilation is I really just have to add the Conditional stuff for the most part, and not rewrite my whole program - am sure thankful for that!

    sound advice that:
    Jon Williams said...
    I suggest you update the program with CC structures and try it while still running the BS2

    And of course this, which is what I should have thought of myself rolleyes.gif
    Jon Williams said...
    As you work through the program have a quick look in the help file to see if there's a difference between the BS2 and the BS2p

    Aloha,
    Robert
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-01-22 04:51
    I love Conditional Compilation; and if one will just do a little bit of planning nearly any program can be designed to run on any member of the BS2 family (1-Wire protocol being the exception).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
Sign In or Register to comment.