Shop OBEX P1 Docs P2 Docs Learn Events
BSIIp basic questions :) — Parallax Forums

BSIIp basic questions :)

Vern GranerVern Graner Posts: 337
edited 2006-07-19 16:04 in BASIC Stamp
Ok, I recently upgraded one of my projects to a BSIIp when I ran out of space in the BSII that was in it. smile.gif I'm now trying to wrap my head around some of the new features the chip IIp offers. If I understand correctly:
  • When you switch from one "slot" to another slot, the contents of any variables (BIT/NIB/BYTE/WORD) are lost.
  • If you need to move values from one slot to another, you write the content of the variable to the scratchpad RAM and then retrieve the value at the start of the program in the new running slot.
If either of the above is wrong, I'd appreciate clarification. (I'd thumb my manual but it's an early version that didn't "know" about the BSIIp!)

Also, in discussions on various boards, it was mentioned that there may be a delay of up to 250msec from the time a program in a slot is called, till the time the program begins to execute. Can anyone verify/debunk this rumor? smile.gif

Lastly, is there any way to use the scratchpad RAM as variable RAM? some trick maybe? I could really use the space. Arrays really chew up variable space! smile.gif

Vern

PS: Thanks to the wonders of Conditional Compile, the code for my BSII went right into the BSIIp! smile.gif

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Vern Graner CNE/CNA/SSE    | "If the network is down, then you're
Senior Systems Engineer    | obviously incompetent so why are we
Texas Information Services | paying you? Of course,if the network
http://www.txis.com        | is up, then we obviously don't need
Austin Office 512 328-8947 | you, so why are we paying you?" ©VLG


Post Edited (Vern) : 7/19/2006 4:05:33 PM GMT

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-07-19 01:41
    Vern,

    ·· You do not lose variables when switching slots.· They are there, but you need to declare them in the exact same order and type (Exactly the same) in each slot to preserve them.· The state of I/O pins are also preserved.· 250ms to switch slots?· I don't think it's anywhere near that time.· If you have a scope of a BSLA you can easily find out by making a pin HIGH, then running the other slot and making another pin HIGH and checking the time in between.· I think you will be surprised.· You cannot use the ScratchPad RAM as variable space, but you can store a lot of stuff there and swap them in/out of temp variables.· THat's what I tend to do.· I hope this helps.· Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Vern GranerVern Graner Posts: 337
    edited 2006-07-19 16:04
    Chris Savage (Parallax) said...
    <snip> I hope this helps. Take care.

    Thanks! That does help a bunch. smile.gif

    Vern

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Vern Graner CNE/CNA/SSE    | "If the network is down, then you're
    Senior Systems Engineer    | obviously incompetent so why are we
    Texas Information Services | paying you? Of course,if the network
    http://www.txis.com        | is up, then we obviously don't need
    Austin Office 512 328-8947 | you, so why are we paying you?" ©VLG
    
    
Sign In or Register to comment.