This document contains information that is proprietary and confidential to B&B
Electronics Mfg. Co. Inc. The methods described herein are for the exclusive use of
B&B Electronics authorized personnel. Any unauthorized use or dissemination of the
information contained in the document is strictly forbidden.
B&B Electronics Mfg Co Inc – 707 Dayton Rd - PO Box 1040 - Ottawa IL 61350 - Ph 815-433-5100 - Fax 815-433-5104 – www.bb-elec.com
The 232BSS4 provides communications to four devices from one serial
port. Each port uses a dedicated UART and includes an 8K byte transmit
buffer and an 8K byte receive buffer (16K bytes total). Each port can be
independently configured for data rate, data format, and protocol. The
Master port can send and receive data from one of the Slave ports while the
other Slave ports continue to buffer data. The Master device can also
broadcast the same message to two or more Slave ports at once.
The 232BSS4 can be configured to send data automatically to the
Master port from each of the Slave ports when data is present with an
optional preamble identifying the port. It can also provide two-way
communications between the Master port and one Slave port at a time.
Switching and control is done through user-defined three or four character
command strings. All control sequences are removed from the data stream,
making the switch transparent to the Slave devices. The PC setup software
provided walks the user through all possible parameters.
Switches can be cascaded to expand the 232BSS4 to more than four
ports. Two units can also be used back-to-back to provi de a utomatic
connection between devices over a single data channel. LEDs on the
232BSS4 indicate when the unit is powered up and which port is selected to
send data to the Master port.
Documentation Number 232BSS4-2907m 1
&B Electronics Mfg Co Inc – 707 Dayton Rd - PO Box 1040 - Ottawa IL 61350 - Ph 815-433-5100 - Fax 815-433-5104 – www.bb-elec.com
Model: 232BSS4
Interface: RS-232 asynchronous
Data Format: 7 or 8 data bits, even, odd, or no parity
(Master does not support 7 data bits with no
parity)
1 stop bit (fixed)
Data Rate: 1200 to 115.2 kbps
Flow Control: Hardware(RTS/CTS) or None
Power Requirements: +10 to +15 VDC @ 60 mA max.
Power Connector: 2.5 mm phone jack (+ tip)
Recommended Supply: B&B Model 232PS (Sold separately)
Operating Temperature:0º to 70º C
Data Connectors: Master DB25 female (DCE)
Slaves DB9 male x 4 (DTE)
Dimensions: 7.5 x 4. 6 x 1. 2 i n. (19.0 x 11.7 x 3.0 cm)
Setup Software: PC compatible,
Windows 95/98/NT/2000/XP/Vista
Supplied Accessories:CDROM with Setup Program
Instruction Manual
Default Parameters
When shipped, the 232BSS 4 comes set up for the following
parameters:
Auto Select mode OFF
DTR NOT required to accept commands
THREE character command
Char1 = ESC (Decimal 27)
Char2 = STX (Decimal 2)
Char3 = “0” (Not Used)
Port Time = 1,000mS (not used)
Inactivity Time = 500mS (not used)
All ports 9600 Baud
All ports 8 Data Bits
All ports No Parity
All ports No Hardware Handshake required
Ports A-D No preamble
Port A selected to Transmit & Receive on Power-up
Refer to the following sections of the manual for what each of these
parameters means and how they can be changed.
2 Documentation Number 232BSS4-2907m
B&B Electronics Mfg Co Inc – 707 Dayton Rd - PO Box 1040 - Ottawa IL 61350 - Ph 815-433-5100 - Fax 815-433-5104 – www.bb-elec.com
Throughout this chapter of the manual, the following symbols and
conventions will be used to clarify what type of data we are addressing.
• Items enclosed in {brackets} will denote one byte.
• A character in “quotes” will normally denote a printable ASCII
character. A byte described in ALL CAPS is the ASCII description
of a non-printable character. The abbreviation dec will denote a
decimal value. The lower case letter h will be used to show a Hex
value.
•Items in italics are optional items only used in certain
configurations. The instances when these items are required will be
explained in the text.
LED Indicators
The 232BSS4 has five LED indicators. The first, labeled “+12 VDC
POWER” indicates that power is applied to the switch. The other four,
labeled “PORT A” to “PORT D” indicate which Slave port is currently
selected to transmit to the Master.
In Smart Switch Only mode, the port LEDs indicate which port was
selected through the Select Port command. In Auto Select mode, the port
LEDs indicate which port is currently sending to the Master. No indication
is provided to display which Slave port is currently receiving from the
Master.
Documentation Number 232BSS4-2907m 5
&B Electronics Mfg Co Inc – 707 Dayton Rd - PO Box 1040 - Ottawa IL 61350 - Ph 815-433-5100 - Fax 815-433-5104 – www.bb-elec.com
The 232BSS4 provides a dedicated UART to all five ports. This allows
any port to be individually configured for baud rate, number of data bits,
parity, and hardware (RTS/CTS) handshaking. Configur ation of all the
ports is done through the setup software.
Baud Rate:
Each port is configurable for the following baud rates:
1200
2400
4800
9600
19.2K
38.4K
57.6K
or 115.2 kbps
Data Bits:
Each port can be configured for Seven or Eight data bits.
Note: If the Master and Slaves are set up differently, the port set for
Seven data bits cannot transmit the eighth bit.
Parity:
Each port can be configured for Even, Odd, or No parity. Because
the Master port uses a slightly different UART, it is not capable of
receiving only seven bits, thus seven data bits with no parity is not
allowed on the Master port. All other configurations are possib le.
Stop bits:
Each port uses 1 stop bit. This value is currently fixed and can not
be changed in the setup software.
Hardware(RTS/CTS) Handshaking:
Each port can be configured to hold data until its input handshake
line goes high. On the Master port, pin four (RTS) would have to be
held high by the host device in order for the 232BSS4 to send data. On
the Slaves, pin eight (CTS) needs to be held high by the Slave device
for the 232BSS4 to send data. The connected devices can prevent data
from being sent from the 232BSS4 by holding their corresp onding
handshake lines low.
6 Documentation Number 232BSS4-2907m
B&B Electronics Mfg Co Inc – 707 Dayton Rd - PO Box 1040 - Ottawa IL 61350 - Ph 815-433-5100 - Fax 815-433-5104 – www.bb-elec.com
Smart Switch Only mode is used when the host device connected
to the Master port initiates all communications with the Slave devices. To
use the 232BSS4 as a Smart Switch Only, Auto Select is left unchecked in
the setup software.
In Smart Switch Only mode, the 232BSS4 is constantly looking for a
command sequence by monitoring the data that is being received on the
Master port from the host device. This command can tell the 232BSS4 to
connect the Master port to a single Slave port, send data to one or more
Slave ports at once, discontinue communications with all Slave ports, or
ignore commands for a specific length of time.
All command characters are buffered until the full command sequence
is received. If the 232BSS4 recognizes the data stream as a command
sequence, the sequence is not passed through the switch.
Options:
Initial Connections:
Upon power-up, the 232BSS4 can be initialized to allow the Master
access to any of the Slave ports without any commands sent. The
Master to Slave and Slave to Master initialization are each
independently configurable through the setup software. The Master can
also be set to broadcast to any or all of the Slave ports on power-up. If
no ports are selected to be initialized on power-up, the 232BSS4 will
wait for a switching command before allowing the Master access to any
of the Slaves.
3 or 4 Character Command:
The 232BSS4 commands can be set to be either three or four
characters long. The first two or three characters can be progra mmed to
any value through the setup software. The third or fourth character is
the actual command.
Thus the command sequence would look like:
{Char1}{Char2}{Char3}{Command Character}
Char1-3 would be defined by the user through the setup software.
Char3 would only be sent if the 232BSS4 was set up for a four character
command.
Documentation Number 232BSS4-2907m 7
&B Electronics Mfg Co Inc – 707 Dayton Rd - PO Box 1040 - Ottawa IL 61350 - Ph 815-433-5100 - Fax 815-433-5104 – www.bb-elec.com
Control Char is only needed for Tx Only, Clear Buffer, and Ignore
Commands
Four Character Command Format:
Char1Char2Char3Command CharControl Char
Control Char is only needed for Tx Only, Clear Buffer, and Ignore
Commands
Table 2.1 - 232BSS4 Command Summary
Function Command
Char.
Select Port A Tx & Rx “A” None Switching Command
Select Port B Tx & Rx “B” None Switching Command
Select Port C Tx & Rx “C” None Switching Command
Select Port D Tx & Rx “D” None Switching Command
Deselect All Ports EOT None Switching Command
Tx Only to Specific Ports“S” Dec 0 to 15 Use to Broadcast
Clear Buffer on Specific
Ports
Ignore Commands “T” “0” to “9” Sets Timer Value
Values in quotes “” are ASCII characters.
Dec. is an abbreviation for decimal value.
“X” Dec 0 to 15 Clear the Receive
Control
Char.
Comments
Buffer
Command Explanation:
Where applicable, this section will provide an example of how to
create the command strings in Visual Basic. Other programming languages
may require a slightly different syntax, but the examples given should
provide enough information to port to other languages. For our examples,
we will use the default settings of the switch:
• 3 Character Command Sequence
• Character 1 set to ASCII ESC character (Decimal 27)
• Character 2 set to ASCII STX character (Decimal 2)
If you choose to use a four character command sequence, just add
another character between the second programmable character and the
command character in the command string.
8 Documentation Number 232BSS4-2907m
B&B Electronics Mfg Co Inc – 707 Dayton Rd - PO Box 1040 - Ottawa IL 61350 - Ph 815-433-5100 - Fax 815-433-5104 – www.bb-elec.com
Commands:
Select Port A to transmit and receive – “A”
Select Port B to transmit and receive – “B”
Select Port C to transmit and receive
– “C”
Select Port D to transmit and receive – “D”
The Select Port commands turn on the selected port for both
transmit and receive operations. Once the command is received by the
switch, any data that had been buffered from the selected Slave device
will be sent to the Master. Any data received on the Master port that is
not a valid command sequence will be passed to the selected Slave port
until another command is received.
For instance, to send and receive data from port B, send:
{Char1}{Char2}{Char3}”B” VB Example:
SwitchB$ = CHR$(27) & CHR$(2) & “B”
Turn Off all selected ports
– ASCII EOT character (decimal 4)
The Turn Off command deselects all ports. No ports will transmit
or receive to/from the Master port until another command is received by
the Master port.
The full command sequence to disable all ports is:
{Char1}{Char2}{Char3}EOT
VB Example:
OFF$ = CHR$(27) & CHR$(2) & CHR$(4)
Send Only to specific ports
– “S” + one control byte specifying which port s
to send.
The Send Only command will tell the 232BSS4 which Slave ports
to send the following data to. This command can be used to broadcast
data to more than one port at a time. The Slave port that is sending to
the Master is not affected.
The lowest four bits of the control byte tell the 232BSS4 which
ports should receive the following data. Bit 0 represents port A, Bit 1
represents port B, Bit 2 represents port C, and Bit 3 represents port D.
In decimal, this is represents a value of 1, 2, 4, and 8 respectively. To
turn on more than one port, the decimal equivalents of each port are
added together to give the final byte.
Documentation Number 232BSS4-2907m 9
&B Electronics Mfg Co Inc – 707 Dayton Rd - PO Box 1040 - Ottawa IL 61350 - Ph 815-433-5100 - Fax 815-433-5104 – www.bb-elec.com
The Clear Buffer command will tell the 232BSS4 which Slave
ports’ receive buffers to purge. If the Master device is only interested in
the most recent data from the Slaves, this command can be used to
delete old data from one or more of the Slave port buffers before it is
sent to the Master.
The lowest four bits of the control byte tell the 232BSS4 which
ports’ buffers to purge. Bit 0 represents port A, Bit 1 represents port B,
Bit 2 represents port C, and Bit 3 represents port D. In decimal, this is
represents a value of 1, 2, 4, and 8 respectively. To clear more than one
buffer with a single command, the decimal equivalents of each port
would be added together to give the final byte.
A summary of the control characters for each combination of ports
is given in Table 2.2.
For instance, to clear the receive buffer on ports A & D, send:
{Char1}{Char2}{Char3}”S”{Decimal 9}
(A = 1, D = 8, 1 + 8 = 9)