
TS-7250 MANUAL
CONNECTORS AND HEADERS
The ioctl Linux system call is used to initialize the automatic RS-485 control logic. For full-
duplex operation, two twisted pairs are used and the transmit driver is typically enabled all
the time. Fail-safe bias resistors are used to bias the TX+, TX- and RX+, RX- lines to the
correct state when these lines are not being actively driven. In a typical RS-485
installation, the RS-485 drivers are frequently “tri-stated.” If fail-safe bias resistors are not
present, the RS-485 bus may “float” and small amounts of noise can cause spurious
characters at the receivers. 4.7K Ohm resistors are used to pull the TX+ and RX+ signals
to 5V and also to bias the TX- and RX- signals to ground.
Termination resistors in many installations are not required when cable lengths are less
than 50 meters and the baud rate is 9600 or less. Termination resistors may be required
for reliable operation when running longer distances or at higher baud rates. Termination
resistors (typically 100-150 ohms) should only be installed at each end of an RS-485
transmission line. In a multi-drop application where there are several drivers and/or
receivers attached, only the devices at each end of the transmission line pair should have
termination resistors.
A read at I/O location
0x2240_0000
bit 1 will return a "1" when the RS-485 option is
installed.
Note
A special ioctl command has been added to the TS-Kernel's serial code to turn off
and on the automatic RS-485 feature. Refer to the Linux for TS-ARM User's Guide
for additional software information on RS-485 support.
RS-485 Quick-Start Procedure
Perform the following steps:
1. Check that the RS-485 option is installed in the
TS-7250
(required).
2. Attach the RS-485 cable to the 10-pin header. (Adapter cables to SubDB9 connector
are available from Technologic Systems).
3. Set the COM2 UART serial parameters (baud rate, data, parity, and stop bits,
interrupts, etc) in your source code.
4. Use the TIOC_SBC's485 ioctl() to enable the automatic RS-485 feature.
5. Simply read() and write() data to the COM2 UART – the automatic RS-485 logic
controls TX enable.
Automatic RS-485 TX Enable
The
TS-7250
supports fully automatic TX enable control under hardware control. This
simplifies the design of half-duplex systems since turning off the transmitter and enabling
the receiver in software is typically difficult to implement. If this is implemented in software,
then the COM2 UART transmit holding register and the transmit shift register both must
be polled until empty before deasserting the TX enable signal to the RS-485 driver. The
design gets more complicated when using the TX FIFO or when using a multi-tasking OS
such as Linux.
The implementation on the
TS-7250
uses hardware to automatically control when the RS-
485 drivers and receivers are selected. The automatic RS-485 logic eliminates the need
for any software polling and supervision. This circuit automatically turns on/off the RS-485
transceiver and receiver at the correct times. This only requires the COM2 Mode registers
to be initialized once based on baud rate and data format.
© Jan, 2010 www.embeddedARM.com 25