RS-485 Transceiver Control
The RS-485 hardware supports four modes of hardware transceiver control. You can use hardware transceiver control to enable and disable your transmitters and receivers so that they function on different bus topologies. The following table lists the status of the transmitters and receivers under each transceiver control mode.
RS-485 Transceiver Control Modes
Mode | Transmitter | Receiver |
---|---|---|
Four-wire mode | Always enabled | Always enabled |
Two-wire mode: DTR controlled with echo | Enabled when DTR asserted | Always enabled |
Two-wire mode: DTR controlled | Enabled when DTR asserted | Enabled when DTR unasserted |
Two-wire mode: Auto Control | Enabled when transmitting data | Enabled when not transmitting data |
Four-Wire Mode
Use the four-wire mode for most full-duplex systems. In this mode, the transmitter and receiver are always enabled. This mode is the default.
Two-Wire Mode: DTR Controlled with Echo
You can use this mode in half-duplex systems where you need to control the transmitter programmatically. In the DTR-with-echo mode, the transmitter is tri-stated when the DTR signal of the UART (Universal Asynchronous Receiver/Transmitter) is unasserted. To transmit, your application first must enable the transmitter by asserting DTR. After the data is fully transmitted, your application unasserts DTR to disable the transmitter. Because the receiver is always enabled in this mode, you receive packets not only from other devices, but also your transmitter. Thus, your receiver echoes all data you transmit.
Two-Wire Mode: DTR Controlled
This mode is similar to the two-wire, DTR-with-echo mode. Although this mode uses the same method as the DTR-with-echo mode to control the transmitter, the hardware automatically disables the receiver whenever the transmitter is enabled. Thus, you do not receive the packets sent from your transmitter.
Two-Wire Mode: Auto Control
In this mode, the serial hardware transparently enables the transmitter and receiver in a two-wire system. Use this mode to remove the burden of transceiver control from your application. The hardware automatically enables the transmitter for each byte to be transmitted. Also, the hardware disables the receiver whenever the transmitter is enabled, so you do not receive the packets sent from your transmitter.
Note When you are communicating with a two-wire device, National Instruments recommends that you use the two-wire Auto Control mode. Because this mode handles the transmitter/receiver enabling for a two-wire connection in your hardware, it reduces the software overhead required to perform this operation in your application program. For more information about serial communication in two or four-wire modes, refer to Serial Communication Issues. |