16
232XSSD43800 Manual
B&B Electronics -- PO Box 1040 -- Ottawa, IL 61350
PH (815) 433-5100 -- FAX (815) 433-5104
If you were writing a program in GWBASIC to select port E of
the 232XSSD4 (address zero) you would form a string like this:
SW0E$ = CHR$(27) + CHR$(2) + "0" + "E"
You could then send SW0E$ to select port E. Similar strings could
be used for turning on the other ports. To turn off the ports the
string might look like this:
TOFF$ = CHR$(27) + CHR$(2) + CHR$(2) + CHR$(4)
NOTE: There is no delay through the Smart Switch and the
data is not buffered.
Programming the User Defined Character
The user-defined character comes programmed as the ASCII
STX character (decimal 2). You can change this to any 8-bit
character you wish by reprogramming DIP switch 2 (SW2). SW2 is
located on the printed circuit board inside the 232XSSD4. Refer to
Figure 2. SW2 is an eight-position switch with each position equal to
a certain weight. Refer to Table 4. It is recommended that a non-
printable character be defined.
For example, if you wish to use the ASCII NAK character as the
user defined character, which has a decimal value of 21, you would
turn on switches 1, 3, and 5 (1 + 4 + 16 = 21). Caution should be
used when selecting the user defined character, so that by itself, or
with the ESC character in front of it (4-character command), or with
the character following it, it is not a valid command to any of the
devices connected to the ports. For instance, on some printers ESC
@ is the reset command. If you tried to use the @ symbol (decimal
64) for the user defined character you could reset your printer every
Table 4. SW2 WEIGHT CHART
DIP Switch 2
WEIGHT
1
1
2
2
3
4
4
8
5
16
6
32
7
64
8
128