
TS-5300 User’s Manual Technologic Systems
05/21/09
8
5.1 Serial Port Configuration Registers
Because both serial ports are 100% PC compatible, software written for the PC that accesses serial
ports directly or through standard BIOS calls will work without modification on the TS-5300. The details
of the COM port internal registers are available in most PC documentation books or the data sheet for
the National Semiconductor NS16C550 may be consulted.
5.2 Serial Port Hardware
Each serial port has 4 lines buffered: the Rx and Tx data
lines and the CTS / RTS handshake pair. This is quite
sufficient to interface with the vast majority of serial
devices. If additional handshake lines are required, it will
be necessary to add a TS-SER1 daughter board. The
TS-5300 serial signals are routed to 10-pin headers
labeled COM1 and COM2. A serial adapter cable can be
plugged into the header to convert this into a standard
DB9 male connector. The pin-outs for the 10-pin header
and DB9 male connector are listed below. The RTS
signal also drives the DTR pin on the serial ports; DTR is
always the same state as RTS. In addition, RTS can be
used to enable the RS-485 transmitter (see below for
more details).
5.3 RS-485 Support
An option is available to add support to COM1 for half
duplex or full duplex RS-485. RS-485 drivers allow
communications between multiple nodes up to 4000 feet
(1200 meters) via twisted pair cable. Half-duplex RS-485
requires one twisted pair plus a Ground connection, while
full duplex requires two twisted pair plus a Ground.
For half-duplex operation, a single twisted pair is used for
transmitting and receiving. Bit 6 at I/O location 77h must
be set to enable RTS mode or bit 7 can be set to enable
Automatic mode. In RTS mode, the serial port RTS signal
controls the RS-485 transmitter/receiver (See Automatic
mode below). When RTS is asserted true, the RS-485
transmitter is enabled and the receiver disabled. When
RTS is de-asserted the transmitter is tri-stated (disabled)
and the receiver is enabled. Since the transmitter and
receiver are never both enabled, the serial port UART
does not receive the data transmitted.
For full-duplex operation, two twisted pairs are used and
the transmitter can typically be left on all the time. Simply
use RTS mode, and set RTS true.
See Table 1 for connector pin-outs.
5V Power 10 5 GND
NC 9 4 DTR (RTS) [out]
[in] CTS 8 3 TX data [out]
[out] RTS 7 2 RX data [in]
NC 6 1 NC
Figure 1 - Serial Port Header and DB9 Pin -
out [signal direction is in brackets]
PLEASE NOTE: The serial port headers
use a non-standard numbering scheme.
This was done so the header pins would
have the same numbering as the corre -
sponding DB-9 pin; i.e. pin 8 (CTS) on the
header connects to pin 8 on the DB -9
RS-485 Quick start procedure:
1. The RS -485 option must be installed
2. Install JP6 for full -duplex or JP7 for half-
duplex RS-485 operation
3. Attach the RS -485 cable to the 3-pin or
5-pin terminal strip connector.
4. Set the COM1 UART serial parameters
(baud rate, data, parity, and stop bits,
interrupts, etc).
5. Run Auto485.exe utility
(configures bits 6 and 7 at I/O 75h)
(and initializes Timer2)
6. For Half-Duplex RTS mode: To
transmit data, assert RTS and write the
data to the UART. To receive
data, deassert RTS and read the data
from the UART
7. For Half-Duplex Automatic mode: just
read or write data to the UART