BS1 commands
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
thanks
Comments
.
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 -->