English
Language : 

PAK-II Datasheet, PDF (22/28 Pages) List of Unclassifed Manufacturers – 310 Ivy Glen Court
high clkpin
low clkpin
next
return
' could use pulsout
' 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
allow you to access the Pak II on the companion
disk. Here is a simple program that counts from 1
to 1000 while blinking an LED connected to the
Pak II's A4 pin:
i var word
gosub FReset
' reset
fpx=$10
gosub IODir
' set B4 to output
gosub FZeroX ' x=0
gosub FSwap
' x<>y
fpx=1
gosub FLoadInt ' x=1.0
gosub FSwap
' x<>y so x=0.0, y=1.0
Debug "Start...", CR
for i=1 to 1000
fpx=i//2*$10
gosub IOWrite ' Blink light
gosub FAdd ' x=x+y
fpx=4
gosub FDump ' print it out
next
Debug "End",cr