Specifications
BASIC Stamp II
Parallax, Inc. • BASIC Stamp Programming Manual 1.8 • Page 309
2
description and schematic. The SIN
pin goes to a PC’s serial data-out pin
on the DB9 connector built into BS2
carrier boards. The connector is wired
to allow the STAMP2 host program
to remotely reset the BS2 for program-
ming, so it may have to be modified
before it can be used with other soft-
ware; see figure I-17.
The BS2 can also receive RS-232 data
through any of its other 16 general-
purpose I/O pins (rpin = 0 through
15). The I/O pins don’t need a line
receiver, just a series resistor (we sug-
gest 22k). The resistor limits current
into the I/O pins’ built-in clamp di-
odes, which keep input voltages
within a safe range.
Figure I-18 shows the pinouts of the
two styles of PC COM ports and how to connect them to the Stamp.
The figure also shows loopback connections that defeat hardware hand-
shaking used by some PC software.
Serial Timing and Mode (Baudmode)
Asynchronous serial communication relies on precise timing. Both the
sender and receiver must be set for identical timing, usually expressed
in bits per second (bps) and called baud.
Serin accepts a 16-bit value called baudmode that tells it the important
characteristics of the incoming serial data—the bit period, data and
parity bits, and polarity. Figure I-19 shows how baudmode is calcu-
lated and table I-3 shows common baudmodes for standard serial baud
rates.
If you’re communicating with existing software, its speed(s) and
mode(s) will determine your choice of baud rate and mode. In general,
7-bit/even-parity (7E) mode is used for text, and 8-bit/no-parity (8N)
1
DB-25 Male
(SOLDER SIDE)
DB-9 Female
(SOLDER SIDE)
I/O pin
22k
I/O pin
22k
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
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.
Pinouts for Standard PC COM Port
Connectors with Serin Hookup
Figure I-18










