21 / 28 page

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
5V
5V
PAK-II
3
2
10
9
20
7, 8, 19
1
6
5
4
BUSY/MODE
ENABLE/BUSY
RES2
RES1
Vss
RESET
CLK
SOUT
SIN
Resonator
Both Resistors:
10 to 22K
Busy output (optional)
Data
Clock
Connections to Host
Vdd
Example 1. Connections to Stamp or similar host