How to Create Automatic Direction Control for RS-485 Interfaces (.PDF Download)
RS-232 was the PC serial communications standard for many years. Hardware and software support for this simple, yet effective, interface was included on every PC made until it was eventually replaced by the faster and more complicated Universal Serial Bus (USB) standard.
However, RS-232 remains popular to this day for many serial-communications applications because of its simplicity and lack of required license fees. Software support for RS-232 is still supplied in the operating system of today’s PCs, and hardware support is available by adding one of the USB-to-serial adapters available from many suppliers.
One limitation of RS-232 is the relatively short distance required between connected equipment. The RS-485 standard solves this problem by replacing the RS-232 inputs and outputs with a differential driver/receiver. With few exceptions, RS-485 transceivers include a direction control to switch the driver between transmit and receive, thereby making the serial interface half-duplex only (one direction at a time). This is not an issue for equipment designed to handle the rapid direction change.
1. Programmable combinational logic senses the PC TX transmit start bit and switches the RS-485 direction to transmit in less than 50 ns.
But if you want to add the RS-485 hardware interface to your RS-232 serial output, you’ll need to implement an automatic direction control to manage the direction change in the data flow. Unfortunately, there aren’t any handshaking signals in the PC’s RS-232 interface fast enough to change the direction back-and-forth at rates required by serial communications.