Differences and Connections Between Serial Ports, UART, RS232, and RS485

Serial Port refers to the serial interface, commonly known as the COM (Communication Port) interface. This is an “old” interface that was primarily introduced to connect computer peripherals, such as mice or modems. Since this interface typically appears in a 9 pin format, it is often referred to as the 9-pin serial port or DB9 interface. Nowadays, computer hosts, especially portable laptops, have largely eliminated this interface; however, it remains active in instruments, industrial equipment, and various embedded systems, highlighting its profound impact and historical significance.

Differences and Connections Between Serial Ports, UART, RS232, and RS485

Fig1: DB9 Serial Port Image

In fact, the COM port is just one type of serial port, as strictly speaking, a serial port refers to a type of communication interface that transmits data bits sequentially, in contrast to a parallel port where data bits are transmitted simultaneously. Therefore, even the most advanced and complex communication interfaces today can be categorized into these two types.

UART stands for Universal Asynchronous Receiver-Transmitter, and like peripherals such as IIC and SPI, it has almost become a standard feature in modern MCUs, serving as a conventional communication module. It is an asynchronous communication method based on a serial data bus, with the core corresponding to the communication protocol that defines the frame format, timing rules, and error detection mechanisms, all belonging to the protocol layer. For communication between single-board MCUs or with other modules on the board, it can be directly connected via PCB traces without the need for any transceivers (which will be discussed later), achieving data communication between the two in a cost-effective and simple manner.

Differences and Connections Between Serial Ports, UART, RS232, and RS485

Fig2: UART Serial Communication Connection Diagram

RS232, RS485 (or RS422) correspond to two common serial communication standards. They primarily specify the electrical characteristics of data communication, such as voltage levels and ranges, ensuring smooth communication between different devices.RS232 uses negative logic, where logic 0: +3V ~ +15V, logic 1: -3V ~ -15V . In contrast, RS485 uses differential signaling, where logic 0: -2V ~ -6V, logic 1: +2V ~ +6V . For RS232, the tolerance of communication levels is increased, which naturally enhances its ability to resist common-mode interference. Typically, instruments and devices commonly use the RS232 serial port standard for communication with PCs. For RS485, due to its use of differential signaling to transmit data signals, it significantly improves the signal’s resistance to interference, making it the standard for industrial communication.

Differences and Connections Between Serial Ports, UART, RS232, and RS485

Fig3: RS232 Serial Communication Networking Diagram

Differences and Connections Between Serial Ports, UART, RS232, and RS485

Fig4: RS485 Serial Communication Networking Diagram

Inter-system communication is achieved through RS232 or RS485 transceiver chips that complete the level conversion corresponding to the supported protocols, enabling long-distance signal transmission. By converting signal levels or transforming them into differential signals, the signal’s resistance to interference can be greatly improved, preventing distortion or errors in the signal due to long-distance transmission. The ultimate goal is to ensure that both parties in communication receive the accurate original transmitted signal. Therefore, for communication between modules within a single board, as mentioned above, direct wiring can achieve this. If it is an embedded device (instruments or industrial instruments) based on two UARTs, then communication between the two devices is achieved through RS232 or RS485 transceivers (to complete signal level conversion), and then connected via cables. Both examples are based on UART serial communication, but the latter can achieve longer communication distances while ensuring communication reliability. (To further enhance communication reliability, we can also use synchronous communication methods, which will not be elaborated on here. Of course, short-distance inter-board communication can also be achieved through direct cable connections, with levels and TTL or CMOS, but with slightly lower resistance to interference.).

Conclusion: This article introduces the basic concepts of serial ports and UART communication modules, explaining the differences between serial and parallel communication. It then provides a brief explanation of two common serial communication standards, RS232 and RS485, along with their communication levels and data logic. Finally, it reveals the basic differences and connections between serial ports, UART, RS232, and RS485 through examples of three main serial standards networking composed of UART modules and RS232/ RS485 transceivers.

Leave a Comment