Shop OBEX P1 Docs P2 Docs Learn Events
BS1 commands — Parallax Forums

BS1 commands

smkbaynsmkbayn Posts: 25
edited 2006-09-26 08:27 in BASIC Stamp
Ok I just got a BS1 rev B. project board for $14.95, what a deal I thought for playing around.··I also have a AD592 temp probe that I want to play with a little bit.· Probem being it looks like I need to use the RCTIME and FREQOUT·commands which the BS1 doesn't have.· I'm sure its really easy to work around, the freqout seems like it wouldn't be too hard·but I would like to get some tried and true examples·from the pros out·there.

thanks

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2006-09-26 01:02
    The POT statement is the approximate equivalent of the RCTIME statement for the BS1. Similarly, the SOUND statement is the approximate equivalent of the FREQOUT statement for the BS1. Look at the descriptions in the Basic Stamp Manual for a discussion of the differences.
    .
  • smkbaynsmkbayn Posts: 25
    edited 2006-09-26 02:02
    thanks. is there also a shiftout, shiftin equivalent?
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-09-26 08:27
    smkbayn -

    SHIFTIN and SHIFTOUT must be simulated on the BS-1 as there are no equivalent commands. What this means is that you must manually perform all of the individual functions that SHIFTIN/SHIFTOUT would ordinarily perform for you automatically. Here is a basic outline of what you must do in pseudo-code:

    Enable the chip in question

    fetch_loop:

    Issue clock pulse

    Fetch a bit and save it

    Do we have all "N" bits required?

    IF so GOTO bail_out

    Shift the newest bit to the left

    GO TO fetch_loop 'go fetch another one

    bail_out:

    Disable chip

    Process newly filled variable

    -=-=-=-=

    I suspect there may be a Nuts and Volts article (which can be found on the Parallax web site in the Downloads Section) which shows you more exactly what must be done.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
Sign In or Register to comment.