All trademarks are the property of their respective owners.
The RS-485 interface works using differential signaling that is effective in rejecting common-mode noise making it a popular choice for long-distance communication. In applications, the enable pins of RS-485 transceivers are usually connected to general purpose input output (GPIO) of microcontrollers. For example, in a common 8-pin half-duplex RS-485 transceiver shown in Figure 1-1, the driver enable (active high) is pin 3 (DE), while the receiver enable (active low) is pin 2 (REB). The auto direction feature reduces the reliance on separate pins for driver-enable and the receiver-enable functionality.
In applications, regular RS-485 drivers or receivers can be controlled by a microcontroller separately with 2 GPIO pins or with 1 GPIO pin if the DE pin and REB pin are shortened. Similarly, if a digital isolator is used for these logic controls, two isolation channels are needed for the DE and REB pin or one isolation channel is needed for the combined DE and REB control pins. To further reduce the number of GPIO pins for logic control or the number of isolation channels needed, the THVD14x6 (THVD1406 and THVD1426) devices can be used. These parts are half-duplex RS-485 transceivers with the auto direction control feature which do not include enable pins like DE and REB as shown in Figure 1-2. Instead, these devices use the data input pin (D pin) to initiate communication. Logic control happens automatically meaning software to support the enable controls are no longer required.
Installed in a system and powered on, THVD14x6 enters the receiver mode by default. When an input signal at the D pin (pin 4) toggles from high to low, the driver is triggered to be active and starts sending data. In RS-485 communication systems, universal asynchronous receiver-transmitter (UART) protocol is widely used. In this protocol, all data is transferred bit by bit, while the last bit is a stop bit which is normally high and the line idles as a logic high afterwords. As the THVD14x6’s input pin is pulled high for a certain time (tdevice_autodir), the driver becomes disabled and releases the bus. The driver active time is 0.8-μs in THVD1426 and 8-μs in THVD1406.
In this application note, several test cases are presented with various system configurations. The information presented can help a system designer understand how the auto direction feature of half duplex RS-485 devices work and aid to build successful systems with devices such as THVD14x6.
In all the tests, TTL-232R cables from Future Technology Devices International Ltd are used to create the communication link from the PC to the RS-485 evaluation boards (EVM) by converting the USB signal to a UART signal. The communication data is generated by a third-party software (Serial Port Utility) on the PC, which follows the UART protocol with various baud rates. Figure 2-1 shows an example of the UART configuration for 115200 baud rate with a byte format of 8 data bits and 1 stop bit.
In the first test, one general purpose half-duplex RS-485 EVM is used with a THVD1426 device populated. The board is terminated with 120-Ω resistor and powered by 3.3-V. By setting the SHDN pin (pin 2) high and the REB pin (pin 3) low, the device is active and the receiver is always on. A string 0x0101h in hexadecimal format with 2,000,000 baud rate is chosen to be transmitted. In measurement, three locations are probed on the board - input data (pin 4), bus pins (pin 6 and 7), and received data (pin 1). In Figure 2-2, channel 1 is input data with the label TX, while channel 2 is output data labeled RX. The bus signal VOD (channel 4) is taken by a differential probe. These test results show that the driver is turned on as the input signal toggles from high to low. After transmission finishes, the driver releases the bus. The bus becomes high impedance and the bus voltage is pulled together by termination
In the second test, with identical hardware setup as the first one, the same string is sent with the baud rate at 115200, which is considerably lower than THVD1426’s recommended operating condition (12 Mbps). The purpose of this test is to check if THVD14x6 works at a data rate lower than the recommendation in the data sheet. One bit width (8.6-μs) of input data is much longer than the maximum active time of the driver (1.45-μs). As the waveforms of the last bit in previous test show, the differential bus voltage becomes 0-V as the driver finishes its active time shown in Figure 2-3. Therefore each 1 bit input shows a spike on bus before settling to 0-V. Given that the receiver threshold Vth+ is -20-mV, this 0-V generates a high at receiver output. Therefore, correct bits are still produced by the receiver. In system design, it might be a good idea to add some pull-up resistors on the A side and pull-down resistors on the B side. These bias resistors would generate a constant voltage higher than 0-V on the idle bus for better noise immunity. For details about how to choose resistor values refer to the RS-485: Passive Failsafe for an Idle Bus article.