English
Language : 

PAK-I Datasheet, PDF (20/28 Pages) List of Unclassifed Manufacturers – 310 Ivy Glen Court
If you are using the Basic Stamp II or Basic Stamp
IISX, you'll have no problems using the ShiftIn
and ShiftOut commands. Many Basic Stamp-
compatible compilers have these commands too. If
you don't have access to these commands, don't
worry. Here is some simple code (written in simple
PBasic) that shows the actions you have to take:
' B1 is the byte to shift
shiftoutput:
output datapin
for b7=0 to 7
' Set data pin to 0 or 1
low datapin
if (b1 & $80) <> $80 then so0
high datapin
so0:
b1=b1*2
' shift byte left
high clkpin
low clkpin
' could use pulsout
next
return
' B1 is byte to input byte
shiftinput:
input datapin
b1=0
for b7=0 to 7
b1=b1*2
b1=b1 | in15
high clkpin
low clkpin
' could use pulsout
next
return
You'll find a library of Basic Stamp II routines that