25.3.3.2.6.2 RS-485 Mode
RS-485 is a communication standard supported by the USART peripheral. It is a physical
interface that defines the setup of a communication circuit. Data are transmitted using
differential signaling, making communication robust against noise. RS-485 is enabled by
writing the RS485 bit in the USARTn.CTRLA register to ‘1
’.
The RS-485 mode supports external line driver devices that convert a single USART transmission into corresponding differential pair signals. It implements automatic control of the XDIR pin that can be used to enable transmission or reception for the line driver device. The USART automatically drives the XDIR pin high while the USART is transmitting and pulls it low when the transmission is complete. An example of such a circuit is shown in the figure below.
RS-485 mode is compatible with One-Wire mode. One-Wire mode enables an internal connection between the TXD pin and the USART receiver, making the TXD pin a combined TxD/RxD line. The RXD pin will be disconnected from the USART receiver and may be controlled by a different peripheral. An example of such a circuit is shown in the figure below.