Specifications
BASIC Stamp II
Parallax, Inc. • BASIC Stamp Programming Manual 1.8 • Page 317
2
Go Stop
Inverted 10
Noninverted 01
Here’s an example that demonstrates fpin flow control. It assumes that
two BS2s are powered up and connected together as shown in figure I-20.
' SENDER: data out pin 1, flow control pin 0
' Baudmode: 9600 N8 inverted
Serout 1\0,16468,["HELLO!"] ' Send the greeting.
' RECEIVER: data in pin 1, flow control pin 0
' Baudmode: 9600 N8 inverted
letta var byte
again:
Serin 1\0,16468,[letta] ' Get 1 byte.
debug letta ' Display on screen.
pause 1000 ' Wait a second.
goto again
Without flow control, the sender would transmit the whole word
“HELLO!” in about 6ms. The receiver would catch the first byte at most;
by the time it got back from the first 1-second Pause, the rest of the
data would be long gone. With flow control, communication is flaw-
less since the sender waits for the receiver to catch up.
In figure I-20, pin 0, fpin, is pulled to ground through a 10k resistor.
This is to ensure that the sender sees a stop signal (0 for inverted comms)
when the receiver is being programmed.
Demo Program
See the examples above.
Figure I-20
P0
P1
VSS
BS2
sender
P0
P1
BS2
receiver
Host PC (for Debug)
programming
cable
VSS
10k










