1. Different Paths, Same Goal
RS-232, RS-422, and RS-485 all belong to UART, which stands for Universal Asynchronous Receiver/Transmitter. They can complete communication using just two signal lines (Rx and Tx);
However, due to the different voltage levels used by each, converting from UART to RS-232, RS-422, or RS-485 requires a conversion chip like the SP3232E or SP3485 (or other similar chips).
It is important to note that RS-232, RS-422, and RS-485 are merely standards for mechanical and electrical interfaces regarding UART communication. Therefore, it is incorrect to refer to RS-232, RS-422, and RS-485 as communication protocols (at most, they pertain to the physical layer of network protocols).
2. RS-232 Interface
RS-232 is a serial physical interface standard defined by the Electronic Industry Association (EIA) in the United States.
RS-232 generally uses only three lines: RXD (2), TXD (3), and GND (5);
Hardware Principles
First, it involves changes in voltage levels, with the chip outputting its own voltage;
Then, the two signal lines of UART, TX and RX, are converted to the TX and RX of RS-232;
The signal voltage levels of RS-232 interfaces are relatively high, which can damage the interface circuit’s chips. Additionally, since they are not compatible with TTL levels, a level conversion circuit is required to connect with TTL circuits.
The transmission rate is relatively low, with a baud rate of 20 Kbps during asynchronous transmission.
The interface uses one signal line and one signal return line to form a common ground transmission method, which is susceptible to common-mode interference, resulting in weak noise immunity.
The RS-232 interface can achieve point-to-point communication, but it cannot support networking functionalities.
To solve this problem, a new standard, RS-485, was created.
3. RS-422 and RS-485
RS-485 uses differential transmission for data signals, also known as balanced transmission, and it employs a pair of twisted wires;
The electrical performance of RS-422 is identical to that of RS-485.
The main difference is that RS-422 has four signal lines: two for sending and two for receiving. Since RS-422 separates sending and receiving, it can transmit 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 two signal lines, so it can only operate in half-duplex mode and is commonly used in bus networks.
Hardware Principles
Note that the two signal lines of RS-485 need to be of equal length for differential signaling.
Thus, RS-485/RS-422 has better noise immunity.
4. Performance Comparison
1. Communication Capability: The RS-485 interface allows up to 128 transceivers to be connected on the bus, enabling users to easily establish a device network using a single RS-485 interface. RS-232 only allows point-to-point communication.
RS-422 supports 10 nodes, while RS-485 supports 32 nodes, enabling multi-node networks.
Network topology typically adopts a terminal-matched bus structure and does not support ring or star networks.
2. Signal Lines: The half-duplex network formed by RS-485 typically requires only two signal lines. The RS-232 port generally uses three lines: RXD, TXD, and GND.
3. Electrical Voltage Levels: The logical “1” of RS-485 is represented by a voltage difference of + (2-6) V between the two lines; the logical “0” is represented by a voltage difference of – (2-6) V. In RS-232-C, the voltage of any signal line is in a negative logical relationship. That is, logical “1” is -5 to -15V; logical “0” is +5 to +15V.
4. Transmission Rate: RS-232 has a low transmission rate, with a baud rate of 20 Kbps during asynchronous transmission. RS-485 has a maximum data transmission rate of 10 Mbps.
5. Transmission Rate: RS-232 has a low transmission rate, with a baud rate of 20 Kbps during asynchronous transmission. RS-485 has a maximum data transmission rate of 10 Mbps.
6. Anti-Interference: The RS-485 interface uses a combination of balanced drivers and differential receivers, providing good noise immunity. The RS-232 interface uses a signal line and a signal return line to form a common ground transmission method, which is prone to common-mode interference.
————————————————
Copyright Notice: This article is an original work by CSDN blogger “EE Lin”, following the CC 4.0 BY-SA copyright agreement. Please include the original source link and this statement when reprinting.
Original link: https://blog.csdn.net/weixin_42124889/article/details/80253009
The Greatest Chip of All Time: 555
Microcontroller -> RTOS -> Linux -> Give Up
Salary is clearly 10K, why do they say it’s 10K?
IIC Driver, Implementing Object-Oriented Programming in C