Specifications
BASIC Stamp II
Parallax, Inc. • BASIC Stamp Programming Manual 1.8 • Page 319
2
Tlabel indicates where the program should go in the event that
permission to transmit data is not granted within the period
specified by timeout.
Explanation
The BS2 can send and receive asynchronous serial data at speeds up to
50,000 bits per second. Serout, the serial-output instruction, can con-
vert and format outgoing data in powerful ways. With all this power
inevitably comes some complexity, which we’ll overcome by walking
you through the process of setting up Serout and understanding its
options. For more information on serial-communication fundamentals,
see the Serin listing.
Physical/Electrical Interface
The BS2 can transmit data serially through any of its I/O pins (tpin =
0—15) or through the SOUT pin (tpin = 16) that goes to the DB9 pro-
gramming connector on BS2 carrier boards. Most common serial de-
vices use the RS-232 standard in which a 1 is represented by –12V and
a 0 by +12V. Serout through the I/O
pins is limited to logic-level voltages
of 0V and +5V; however, most RS-232
devices are designed with sufficient
leeway to accept logic-level Serout
transmissions, provided that they are
inverted (see Serial Timing and Mode
below).
Figure I-21 shows the pinouts of the
two styles of PC com ports and how
to connect them to receive data sent
by Serout through pins 0—15. The fig-
ure also shows loopback connections
that defeat hardware handshaking
used by some PC software.
The SOUT pin can comply with the
RS-232 electrical standard by stealing
the negative signal voltage from an
RS-232 input at SIN. See the BS2 hard-
1
DB-25 Male
(SOLDER SIDE)
DB-9 Female
(SOLDER SIDE)
I/O pin
I/O pin
2345678910111213
12345
6789
141516171819202122232425
NOTE: Most DB25 sockets on
PCs are parallel, not serial, ports.
See your documentation!
1
2
3
4
5
Protective Ground
Transmit Data (TD)
Receive Data
Request to Send (RTS)
Clear to Send (CTS)
6
7
8
20
Data Set Ready (DSR)
Signal Ground (SG)
Data Carrier Detect (DCD)
Data Terminal Ready (DTR)
Ring Indicator (RI) 22
–
3
2
7
8
6
5
1
4
9
DB25
Function
DB9
Pinouts for Standard PC COM Port
Connectors with Serout Hookup
NOTE: In the connector drawings above, several handshaking lines are
shown connected together: DTR-DSR-DCD and RTS-CTS. This for the
benefit of terminal programs that expect hardware handshaking. You may
omit these connections if you’re using software that doesn’t expect
handshaking, or if you’re writing your own software without handshaking.
Figure I-21










