SEROUT - BASIC Stamp Command Reference
Host PC
(for Debug)
The SEROUT command supports open-drain and open-source output,
which makes it possible to network multiple BASIC Stamps on a single
pair of wires. These "open baudmodes" only actively drive the Tpin in one
state (for the other state, they simply disconnect the pin; setting it to an
input mode). If two BASIC Stamps in a network had their SEROUT lines
connected together (while a third device listened on that line) and the
BASIC Stamps were using always-driven baudmodes, they could
simultaneously output two opposite states (ie: +5 volts and ground). This
would create a short circuit. The heavy current flow would likely damage
the I/O pins or the BASIC Stamps themselves. Since the open baudmodes
only drive in one state and float in the other, there's no chance of this kind
of short.
The polarity selected for SEROUT determines which state is driven and
which is open as in Table 5.88.
Inverted
Non-inverted
Since open baudmodes only drive to one state, they need a resistor to pull
the networked line into the other state, as shown in Table 5.88 and in
Figures 5.36 and 5.37.
Open baudmodes allow the BASIC Stamp to share a line, but it is up to
your program to resolve other networking issues such as who talks when
and how to detect, prevent and fix data errors.
Page 304 • BASIC Stamp Programming Manual 2.0b • www.parallaxinc.com
programming
cable
P1
BS2
P0
receiver
VSS
State (0)
State (1)
Open
Driven
Driven
Open
P1
BS2
P0
sender
10k
VSS
Resister
Pulled to
Gnd (Vss)
+5V (Vdd)
Figure 5.35: Flow-Control Example
Circuit.
U
O
B
SING
PEN
AUDMODES FOR
N
BASIC S
ETWORKING
TAMPS
Table 5.88: BS2, BS2e, BS2sx and
BS2p Open Baudmode States.
.
Need help?
Do you have a question about the BASIC Stamp 2e and is the answer not in the manual?