Serial communication is one of the most basic communication methods faced by electrical engineers, with RS-232 being the simplest among them.Many beginners often struggle to understand the relationship and differences between UART and RS-232, RS-422, and RS-485. This article will discuss these concepts to help clarify their relationships.
If we compare serial communication to traffic, UART is like a station, and a frame of data is akin to a car. Cars must obey traffic rules while on the road. In urban areas, the speed limit is generally 30-40, while on highways it can reach 120. The type of road and speed limit depend on the protocol specifications. Common serial protocols include RS-232, RS-422, and RS-485. What are the subtle differences between them? Let’s explore.
1. What is UART
UART stands for Universal Asynchronous Receiver/Transmitter, commonly referred to as UART. It is an asynchronous transceiver and a key module for asynchronous communication between devices. UART handles the serial/parallel and parallel/serial conversion between the data bus and the serial port, and defines the frame format. As long as both communicating parties use the same frame format and baud rate, communication can be completed using just two signal lines (Rx and Tx) without sharing a clock signal, which is why it is also called asynchronous serial communication.

By adding a suitable level converter, such as SP3232E or SP3485, UART can also be used for RS-232 and RS-485 communication or connected to a computer port. UART is widely used in applications such as mobile phones, industrial control, and PCs.

UART uses asynchronous serial communication.
Serial communication refers to the method of transmitting data one bit at a time over a single transmission line. Its characteristics include a simple communication line, which can be achieved with simple cabling, reducing costs and making it suitable for long-distance communication, although it is slower in speed.
Asynchronous communication uses a character as the unit of transmission, and the time interval between two characters during communication is not fixed; however, the time interval between two adjacent bits within the same character is fixed.
The data transmission rate is expressed in baud rate, which is the number of binary bits transmitted per second. For example, if the data transmission rate is 120 characters per second and each character consists of 10 bits (1 start bit, 7 data bits, 1 parity bit, and 1 stop bit), the baud rate is 10×120 = 1200 characters per second = 1200 baud.
The data communication format is shown in the diagram below:

The meanings of each bit are as follows:
Start bit: A logic “0” signal is sent first, indicating the beginning of the character transmission. Data bit: Can be 5-8 bits of logic “0” or “1”. For example, ASCII code (7 bits), extended BCD code (8 bits). Parity bit: After adding this bit to the data bits, the number of “1” bits should be even (even parity) or odd (odd parity). Stop bit: It indicates the end of a character data and can be 1 bit, 1.5 bits, or 2 bits high level. Idle bit: It is in a logic “1” state, indicating that there is no data transmission on the current line.
Note: Asynchronous communication is character-based; the receiving device can correctly receive data as long as it maintains synchronization with the sending device within the transmission time of one character after receiving the start signal. The arrival of the next character’s start bit recalibrates synchronization (achieved by detecting the start bit to self-synchronize the clocks of the sender and receiver).

2. RS-232 Standard
RS-232 is a serial physical interface standard established by the Electronic Industry Association (EIA) in the United States. RS is the abbreviation for “Recommended Standard,” and 232 is the identification number. RS-232 specifies electrical and physical characteristics that apply only to the data transmission path; it does not include methods for data processing. It should be noted that many people often mistakenly refer to RS-232, RS-422, and RS-485 as communication protocols, which is incorrect. In fact, they are merely mechanical and electrical interface standards regarding UART communication (at most, they pertain to the physical layer of network protocols).
The standard specifies the use of a 25-pin DB-25 connector, defining the signal content for each pin of the connector and specifying the voltage levels for various signals. Later, IBM simplified RS-232 to a DB-9 connector for PC machines, which has become the de facto standard today. The RS-232 port used in industrial control generally only uses three lines: RXD (2), TXD (3), and GND (5).

In the early days, as PCs were equipped with RS-232 interfaces, RS-232 was the preferred choice when using UART. However, modern personal computers, including laptops and desktops, no longer include RS-232 interfaces, and most motherboards do not have DB9 connectors. Therefore, development boards now typically choose TTL UART or directly implement UART to USB on the development board.
In embedded systems, the serial port usually refers to the UART port, but we often confuse its distinction from the COM port and the relationships between RS-232, TTL, etc. In fact, UART and COM refer to the physical interface form (hardware), while TTL and RS-232 refer to the voltage standards (electrical signals).
UART has 4 pins (VCC, GND, RX, TX) and uses TTL levels, with low level as 0 (0V) and high level as 1 (3.3V or above).
3. RS-485/RS-422 Standards
The RS-232 interface can achieve point-to-point communication, but this method cannot support networking functions. To solve this issue, a new standard, RS-485, was developed. RS-485 uses differential signaling for data transmission, also known as balanced transmission, which employs a pair of twisted wires, defining one wire as A and the other as B.
Typically, the positive voltage level between the sending drivers A and B is +2 to +6V, representing one logic state, while the negative voltage level is -2 to +6V, representing another logic state. There is also a signal ground C; RS-485 includes an “enable” terminal, which is optional in RS-422.
The electrical characteristics of RS-422 are identical to those of RS-485. The main difference is that RS-422 has 4 signal lines: two for transmission and two for reception. Since RS-422 separates receiving and transmitting, it can send and receive simultaneously (full duplex). Because full duplex requires separate channels for sending and receiving, RS-422 is suitable for communication between two stations, star networks, and ring networks, but not for bus networks; RS-485 has only 2 signal lines, so it can only operate in half-duplex mode and is commonly used in bus networks.

1. The electrical characteristics of RS-485: Logic “1” is represented by the voltage difference between the two lines being + (2~6)V; logic “0” is represented by the voltage difference being – (2~6)V. The interface signal levels are lower than those of RS-232-C, making it less likely to damage the interface circuit chips, and this level is compatible with TTL levels, facilitating connections with TTL circuits.
2. The maximum data transmission rate of RS-485 is 10Mbps.
3. The RS-485 interface uses a combination of balanced drivers and differential receivers, enhancing its ability to resist common-mode interference, thus providing good noise immunity.
4. The maximum communication distance for RS-485 is approximately 1219M, with a maximum transmission rate of 10Mb/S. The transmission rate is inversely proportional to the transmission distance. At a transmission rate of 100Kb/S, it can achieve the maximum communication distance. If longer distances are needed, RS-485 repeaters must be used. The RS-485 bus generally supports a maximum of 32 nodes, but with specialized 485 chips, it can support up to 128 or 256 nodes, with a maximum of 400 nodes.
Due to the early appearance of the RS-232 interface standard, it inevitably has some shortcomings, mainly including the following points:
(1) The signal voltage levels of the interface are relatively high, which can easily damage the interface circuit chips. Additionally, RS-232 levels are not compatible with TTL levels, so level conversion circuits are required to connect with TTL circuits;
(2) The transmission rate is relatively low, with a baud rate of 20Kbps during asynchronous transmission. Nowadays, with the use of new UART chips, the baud rate can reach 115.2Kbps (1.832M/16);
(3) The interface uses one signal line and one signal return line, forming a common-ground transmission method. This common-ground transmission is prone to common-mode interference, resulting in weak noise immunity;
(4) The transmission distance is limited, with a maximum standard transmission distance of 50 meters, but in practice, it can only be used at around 15 meters;
(5) RS-232 only allows one-to-one communication and does not consider forming a serial bus. (This is crucial; in many control scenarios, it is one control to many. If the master device needs to communicate point-to-point with all slave devices, the wiring on-site will become a spider web.)

Unbalanced serial communication interfaces RS-423, RS-449


Balanced serial communication interface RS-422
RS-422 (EIA RS-422-A Standard) is the serial connection standard for Apple’s Macintosh computers. RS-422 uses differential signaling, while RS-232 uses unbalanced reference ground signaling. Differential transmission uses two wires to send and receive signals. Compared to RS-232, it offers better noise immunity and longer transmission distances, which is a significant advantage in industrial environments.




4. Comparison Between RS-232 and RS-485
1. Anti-interference: The RS-485 interface uses a combination of balanced drivers and differential receivers, providing good noise immunity. The RS-232 interface uses one signal line and one signal return line, forming a common-ground transmission method that is prone to common-mode interference.
2. Transmission distance: The maximum standard transmission distance for RS-485 is 1200 meters (at 9600bps), and it can actually reach up to 3000 meters. RS-232 has a limited transmission distance, with a maximum standard distance of 50 meters, but in practice, it can only be used at around 15 meters.
3. Communication capability: The RS-485 interface allows for up to 128 transceivers on the bus, enabling users to easily establish a device network using a single RS-485 interface. RS-232 only allows for one-to-one communication.
4. Transmission rate: RS-232 has a lower transmission rate, with a baud rate of 20Kbps during asynchronous transmission. The maximum data transmission rate for RS-485 is 10Mbps.
5. Signal lines: An RS-485 interface forms a half-duplex network, generally requiring only two signal lines. The RS-232 interface usually only uses three lines: RXD, TXD, and GND.
6. Electrical voltage levels: Logic “1” in RS-485 is represented by a voltage difference of + (2-6)V between the two lines; logic “0” is represented by a voltage difference of – (2-6)V. In RS-232-C, the voltage on any signal line is in a negative logic relationship. That is, logic “1” is -5 to -15V; logic “0” is +5 to +15V.
5. Comparison Between RS-422 and RS-485
The electrical performance of RS-485 is identical to that of RS-422. The main differences are:
1. RS-422 has 4 signal lines: two for transmission (Y, Z) and two for reception (A, B). Since RS-422 separates receiving and transmitting, it can send and receive simultaneously (full duplex).
2. RS-485 has only two data lines: sending and receiving both use A and B. Since RS-485 shares two lines for sending and receiving, it cannot send and receive simultaneously (half duplex).
RS-485 standards use balanced transmission and differential reception data transceivers to drive the bus, with specific requirements:
The receiver’s input resistance RIN ≥ 12kΩ
The driver can output a common-mode voltage of ±7V
The input capacitance ≤ 50pF
With 32 nodes and configured with 120Ω terminating resistors, the driver must still output at least 1.5V (the size of the terminating resistor relates to the parameters of the twisted pair used).
The receiver’s input sensitivity is 200mV (i.e., (V+) – (V-) ≥ 0.2V indicates signal “0”; (V+) – (V-) ≤ -0.2V indicates signal “1”).

Due to the long-distance, multi-node (32 nodes), and low transmission line costs, EIA RS-485 has become the preferred standard for data transmission in industrial applications.
(1) The electrical characteristics of RS-485: The sender indicates logic “0” with a voltage difference of + (2~6)V between the two lines; logic “1” is indicated by a voltage difference of – (2~6)V between the two lines. The receiver: if A is higher than B by more than 200mV, it is considered logic “0”; if A is lower than B by more than 200mV, it is considered logic “1”;
(2) The maximum data transmission rate of RS-485 is 10Mbps. However, since RS-485 often needs to communicate with the RS-232 port of a PC, the practical maximum is generally 115.2Kbps. Higher rates would reduce the transmission distance of RS-485, so it is often set around or below 9600bps;
(3) The RS-485 interface uses a combination of balanced drivers and differential receivers, providing good noise immunity;
(4) The maximum standard transmission distance of RS-485 is 1200 meters (at 9600bps), and it can actually reach 3000 meters. The RS-485 interface allows up to 128 transceivers on the bus, meaning RS-485 supports multi-device communication functionality, allowing users to easily establish networks using a single RS-485 interface. Since RS-485 interfaces form half-duplex networks, they generally require only two signal lines. The international standard for RS-485 does not specify a connector standard, so terminal blocks or DB-9, DB-25 connectors can be used.
When using the RS-485 interface, the maximum cable length allowed for the data signal transmission from the generator to the load is a function of the signal rate, based on the characteristics of the transmission cable and the load. The maximum cable length is primarily limited by signal distortion and noise. The relationship between maximum cable length and signal rate is determined using 24AWG copper twisted pair telephone cable (diameter 0.51mm), with a capacitance of 52.5PF/M and a terminal load resistance of 100 ohms (Refer to GB11014-89 Appendix A). When the data signal rate drops below 90Kbit/S, assuming the maximum allowable signal loss is 6dBV, the cable length is limited to 1200m. In practice, it is entirely possible to achieve greater cable lengths.
For long-distance communication using RS-485, it is recommended to use shielded cables and connect the shield layer to the ground.
6. Three Factors Affecting RS-485 Bus Communication Speed and Reliability
1. Signal reflection in communication cables
During communication, two signal factors cause signal reflection: impedance discontinuity and impedance mismatch.
Impedance discontinuity occurs when the signal suddenly encounters a very low or zero impedance at the end of the transmission line, causing reflection, similar to how light reflects when transitioning between different media. To eliminate this reflection, a terminating resistor matching the characteristic impedance of the cable must be connected at the end of the cable. Since the signal travels bidirectionally on the cable, a similar terminating resistor should also be connected at the other end of the communication cable.

Theoretically, as long as a terminating resistor matching the cable’s characteristic impedance is connected at the end of the transmission cable, signal reflection should not occur. However, in practical applications, due to the characteristic impedance of the transmission cable being related to communication baud rates and other environmental factors, the characteristic impedance cannot be perfectly matched with the terminating resistor, so some signal reflection will still exist.
Another cause of signal reflection is the mismatch between the data transceiver and the transmission cable’s impedance. This type of reflection mainly manifests when the communication line is in an idle state, leading to data chaos across the entire network.
The impact of signal reflection on data transmission ultimately arises because the reflected signal triggers the comparator at the receiver’s input, causing the receiver to misinterpret the signal, leading to CRC errors or entire data frame errors.
In signal analysis, the parameter used to measure the strength of the reflected signal is RAF (Reflection Attenuation Factor). Its calculation formula is as follows:
RAF=20lg(Vref/Vinc) (1)
Where: Vref—voltage magnitude of the reflected signal; Vinc—voltage magnitude of the incident signal at the connection point between the cable and the transceiver or terminal resistor.
The specific measurement method is illustrated in the diagram. For example, if the peak-to-peak value of a 2.5MHz incident signal is +5V and the peak-to-peak value of the reflected signal is +0.297V, then the reflection attenuation factor of this communication cable at a 2.5MHz communication rate is:
RAF=20lg(0.297/2.5)=-24.52dB

To mitigate the impact of reflected signals on communication lines, noise suppression and bias resistor methods are commonly used. In practical applications, for relatively small reflected signals, the bias resistor method is often adopted for its simplicity and convenience. The principle of how to improve communication reliability through bias resistors in communication lines is as follows.
2. Signal attenuation in communication cables
The second factor affecting signal transmission is signal attenuation during transmission through the cable. A transmission cable can be viewed as an equivalent circuit composed of distributed capacitance, distributed inductance, and resistance.

The distributed capacitance C of the cable is mainly generated by the two parallel conductors of the twisted pair. The resistance of the conductors has a minimal impact on the signal and can be neglected. The signal loss is primarily due to the LC low-pass filter formed by the distributed capacitance and distributed inductance of the cable. The attenuation coefficients of the standard two-core cable used in PROFIBUS (the standard cable selected by Siemens for the DP bus) at different baud rates are shown in Table 1.
The attenuation coefficients of the cable

3. Pure resistive load in communication cables
The third factor affecting communication performance is the magnitude of the pure resistive load (also known as the DC load). This refers to the pure resistive load primarily consisting of the terminal resistance, bias resistance, and RS-485 transceiver.

In the description of the EIA RS-485 specification, it was mentioned that the RS-485 driver, when connected to 32 nodes with 150Ω terminating resistors, can output at least 1.5V of differential voltage. The input resistance of one receiver is 12kΩ, and the equivalent circuit of the entire network is shown in the diagram. Based on this, the load capacity of the RS-485 driver is calculated as:
RL=32 input resistors in parallel with 2 terminal resistors=(((12000/32)×(150/2))/((12000/32)+(150/2)))≈51.7Ω
Currently, commonly used RS-485 drivers include MAX485, DS3695, MAX1488/1489, and SN75176A/D used by Holley, among others. Some RS-485 drivers have load capacities that can reach 20Ω. Without considering many other factors, according to the relationship between driver capacity and load, a single driver can support far more than 32 nodes.
When the communication baud rate is relatively high, bias resistors are necessary on the line. The connection method of the bias resistor is illustrated in the diagram. Its function is to pull the level of the bus away from 0V when there is no data (idle state) on the bus, as shown in the diagram. This way, even if small reflected signals or interference occur in the line, the data receivers connected to the bus will not malfunction due to these signals.

Through the following example, the size of the bias resistor can be calculated:
Terminal resistance Rt1=Rr2=120Ω;
Assuming the maximum peak-to-peak value of the reflected signal Vref ≤ 0.3Vp-p, then the negative half-cycle voltage Vref ≤ 0.15V; the reflection current Iref caused by the reflected signal on the terminal resistor ≤ 0.15/(120||120)=2.5mA. The hysteresis voltage value of a typical RS-485 transceiver (including SN75176) is 50mV, that is:
(Ibias-Iref)×(Rt1||Rt2)≥50mV
Thus, it can be calculated that the bias current generated by the bias resistor Ibias≥3.33mA
+5V=Ibias(Rpull-up+Rpull-down+(Rt1||Rt2)) (2)
Using equation (2), it can be calculated that Rpull-up=Rpull-down=720Ω
In practical applications, there are two methods to add bias resistors to the RS-485 bus:
(1) Distributing the bias resistors evenly to each transceiver on the bus. This method adds a bias resistor to each transceiver connected to the RS-485 bus, providing a bias voltage to each transceiver.
(2) Using a pair of bias resistors on a segment of the bus. This method is effective for significant reflected signals or interference on the bus. It is worth noting that adding bias resistors increases the load on the bus.
7. Relationship Between RS-485 Bus Load Capacity and Communication Cable Length
When designing the network configuration of RS-485 bus (bus length and number of loads), three parameters should be considered: pure resistive load, signal attenuation, and noise margin. The pure resistive load and signal attenuation have been discussed earlier; now we will discuss the noise margin. The noise margin of RS-485 bus receivers should be at least greater than 200mV. The previous discussions assumed a noise margin of zero. In practical applications, to enhance the bus’s anti-interference capability, it is desirable for the system’s noise margin to be better than what is stipulated in the EIA RS-485 standard. The following formula shows the relationship between the number of loads on the bus and the communication cable length:
Vend=0.8(Vdriver-Vloss-Vnoise-Vbias)(3)
Where: Vend is the signal voltage at the end of the bus, which is specified as 0.2V during standard measurement; Vdriver is the output voltage of the driver (related to the number of loads. For 5-35 loads, Vdriver=2.4V; for fewer than 5 loads, Vdriver=2.5V; for more than 35 loads, Vdriver≤2.3V); Vloss is the loss of the signal during the transmission process in the bus (related to the specifications and length of the communication cable), calculated using the standard cable attenuation coefficients provided in Table 1 based on the formula for attenuation coefficient b=20lg(Vout/Vin), where Vloss=Vin-Vout=0.6V (Note: the communication baud rate is 9.6kbps, and the cable length is 1km; if the baud rate increases, Vloss will also increase); Vnoise is the noise margin, which is specified as 0.1V during standard measurement; Vbias is the bias voltage provided by the bias resistors (typical value is 0.4V).
Equation (3) includes a factor of 0.8 to prevent the communication cable from entering a fully loaded state. From equation (3), it can be seen that the size of Vdriver is inversely proportional to the number of loads on the bus, and the size of Vloss is inversely proportional to the length of the bus; the other parameters depend only on the type of driver used. Therefore, once the RS-485 driver is selected, under a constant communication baud rate, the number of loads on the bus is directly related to the maximum distance the signal can be transmitted. Specifically, within the allowable range of the bus, the more loads there are, the shorter the distance the signal can be transmitted; the fewer loads there are, the farther the signal can be transmitted.
8. Impact of Distributed Capacitance on RS-485 Bus Transmission Performance
The distributed capacitance of the cable is mainly generated by the two parallel conductors of the twisted pair. Additionally, there is also distributed capacitance between the conductors and ground, although it is small, it should not be ignored in analysis. The impact of distributed capacitance on bus transmission performance is primarily due to the transmission of fundamental wave signals on the bus, where the signal representation has only “1” and “0”. In special bytes, such as 0x01, the signal “0” allows sufficient charging time for the distributed capacitance, while when the signal “1” arrives, the charge in the distributed capacitance cannot discharge in time, leading to (Vin+) – (Vin-) still being greater than 200mV, resulting in the receiver misinterpreting it as “0”, ultimately causing CRC errors and errors in the entire data frame transmission. The specific process is illustrated in the diagram.

Due to the impact of distribution on the bus, errors in data transmission occur, leading to reduced overall network performance. To solve this problem, two methods can be employed:
(1) Reducing the baud rate of data transmission;
(2) Using cables with low distributed capacitance to improve transmission line quality.
Simply connecting the A and B ends of each interface with a pair of twisted wires without grounding the RS-485 communication link can work in some cases, but it poses a potential risk for the system. The RS-485 interface transmits signals differentially and does not require a reference point to detect the signal system; it only needs to detect the potential difference between the two wires. However, it should be noted that the transceiver only operates normally when the common-mode voltage does not exceed a certain range (-7V to +12V). When the common-mode voltage exceeds this range, it can affect communication reliability or even damage the interface. As illustrated in the diagram, when transmitter A sends data to receiver B, the output common-mode voltage of transmitter A is VOS. Due to the presence of ground potential differences VGPD between the two systems with their own independent grounding systems, the common-mode voltage at the receiver’s input can reach VCM=VOS+VGPD. The RS-485 standard specifies that VOS≤3V, but VGPD can vary significantly (up to several volts or even tens of volts), potentially accompanied by strong interference signals, causing the common-mode input VCM to exceed the normal range, leading to interference currents on the signal line that affect normal communication or damage the equipment.
Conclusion:
The serial port is a very versatile device interface, commonly used for communication in instruments and equipment, often for remote data collection or remote control. The development of serial ports is relatively simple, making it one of the favorite interfaces for many engineers.

Source: Comprehensive Network, infringement will be deleted upon notification, thank you.
Don’t forget to click “Read“