Specifications
BASIC Stamp II
Page 326 • BASIC Stamp Programming Manual 1.8 • Parallax, Inc.
Since open baudmodes only drive
to one state, they need a resistor to
pull the network into the other state,
as shown in the table above and in
figure I-23.
Open baudmodes allow the BS2s to
share a party line, but it is up to your
program to resolve other network-
ing issues, like who talks when and
how to prevent, detect and fix data
errors. In the example shown in fig-
ure I-24 and the program listings
below, two BS2s share a party line.
They monitor the serial line for a
specific cue (“ping” or “pong”), then transmit data. A PC may monitor
net activity via a line driver or CMOS inverter as shown in the figure.
' Net #1: This BS2 sends the word "ping" followed by a linefeed
' and carriage return (for the sake of a monitoring PC). It
' then waits to hear the word "pong" (plus LF/CR), pauses
' 2 seconds, then loops.
b_mode con 32852 ' Baudmode: 9600 noninverted, open, 8N
again:
serout 0,b_mode,["ping",10,13]
serin 0,b_mode,[wait ("pong",10,13)]
pause 2000
goto again
Figure I-24
P0 Vss
(GND)
+5V
1k
P0 Vss
(GND)
BS2
#1
BS2
#2
CMOS Inverter
or Serial Line Driver
PC: Receive
Data (RD)
PC: Signal
Ground (SG)
Open/Noninverted
Open/Inverted
I/O
pin
Vss
(GND)
+5V
1k
I/O
pin
Vss
(GND)
I/O
pin
Vss
(GND)
BS2 BS2 BS2
I/O
pin
Vss
(GND)
1k
I/O
pin
Vss
(GND)
I/O
pin
Vss
(GND)
BS2 BS2 BS2
Figure I-23










