RS232 and RS485 who are the highways in UART

RS232 and RS485 who are the highways in UART

Serial communication is the most basic communication method faced by electronic engineers. RS-232 is the simplest one. However, many beginners often don't know the connection and difference between UART and RS-232, RS-422, and RS-485. This article will talk about my understanding of these concepts and help you to clarify the relationship between them.

Communication problems, like traffic problems, also have high speed, low speed, congestion, interruption and so on. If you compare serial communication to traffic and UART to station, then one frame of data is like a car. The car runs on the road and must obey the traffic rules. If it is in the city, the general speed limit is 30, 40, and the highway can go to 120. What is the speed of the car, and how much speed limit depends on how the agreement is stipulated. Common serial protocols are RS-232, RS-422, RS-485, etc. So who is the highway in UART? Let's discuss it together.

First, what is UART?

The UART is a Universal Asynchronous Receiver/Transmitter, commonly referred to as a UART. It is an asynchronous transceiver that is a key module for asynchronous communication between devices. The UART is responsible for processing the serial/parallel, parallel/serial conversion between the data bus and the serial port, and specifies the frame format; the communication parties can use the same frame format and baud rate to share the clock signal. The communication process can be completed with only two signal lines (Rx and Tx), so it is also called asynchronous serial communication.

If you add a suitable level shifter, such as SP3232E, SP3485, the UART can also be used for RS-232, RS-485 communication, or connected to the computer's port. UART applications are very extensive, and UARTs are used in applications such as cell phones, industrial controls, and PCs.

Second, the RS-232 standard

RS-232 is a serial physical interface standard developed by EIA (Electronic Industry AssociaTIon). RS is an abbreviation of English "Recommended Standard" and 232 is an identification number. RS-232 is a specification of electrical and physical characteristics that acts only on the data transmission path. It does not contain the way data is processed. Need to explain, many people often mistake RS-232, RS-422, RS-485 as the communication protocol, which is very inappropriate, in fact, they are only a mechanical and electrical interface standard for UART communication (at most The physical level in the network protocol).

The standard specifies a 25-pin DB-25 connector that specifies the signal content of each pin of the connector and also specifies the level of each signal. IBM's PCs later reduced RS-232 to a DB-9 connector, making it the de facto standard today. The industrial control RS-232 port generally uses only three lines of RXD (2), TXD (3), and GND (5).

Third, RS-485/RS-422 standard

The RS-232 interface enables point-to-point communication, but this method does not enable networking. So, in order to solve this problem, a new standard RS-485 was produced. The RS-485 data signal uses differential transmission, also known as balanced transmission. It uses a pair of twisted pairs, one of which is defined as A and the other is defined as B.

Normally, the positive level between the transmit drivers A and B is +2 to +6V, which is a logic state, and the negative level is -2 to 6V, which is another logic state. There is also a signal ground C, which has an "enable" end in RS-485, which is available and not available in RS-422.

The electrical performance of RS-422 is exactly the same as RS-485. The main difference is that RS-422 has 4 signal lines: two transmissions and two receptions. Since the reception and transmission of RS-422 are separate, it can be simultaneously transmitted and transmitted (full duplex), and because full duplex requires transmission and reception to have a separate channel, RS-422 is suitable for communication between two stations. Star network, ring network, can not be used for bus network; RS-485 only has 2 signal lines, so it can only work in half-duplex mode, which is often used in bus network.

Fourth, RS-232 and RS-485 performance comparison

1. Anti-interference : RS485 interface is a combination of balanced driver and differential receiver, which has good anti-noise interference. The RS232 interface uses a signal line and a signal return line to form a common transmission form. This common transmission is prone to common mode interference.

2. Transmission distance: The maximum transmission distance of the RS485 interface is 1200 meters (9600bps), which is actually up to 3000 meters. The RS232 transmission distance is limited, and the maximum transmission distance is 50 meters. In fact, it can only be used at about 15 meters.

3. Communication capability: The RS-485 interface allows up to 128 transceivers to be connected on the bus. Users can easily establish a network of devices using a single RS-485 interface. RS-232 only allows one-to-one communication.

4. Transmission rate: The RS-232 transmission rate is low. When transmitting asynchronously, the baud rate is 20Kbps. The maximum data transfer rate of RS-485 is 10Mbps.

5. Signal line: A half-duplex network composed of RS485 interfaces, generally only two signal lines. The RS-232 port generally uses only three lines of RXD, TXD, and GND.

6. Electrical level value: The logic "1" of RS-485 is represented by the voltage difference between the two lines + (2-6) V; the logic "0" is the voltage difference between the two lines - (2-6) V means. The voltage of any one of the signal lines in RS-232-C is in a negative logic relationship. Namely: logic "1", -5 - -15V; logic "0" +5- +15V.

The serial port is a very common device interface. It is a common communication interface for instrumentation equipment. It is often used to remotely collect device data or implement remote control. The development of the serial port is also relatively simple, and it is one of the favorite interfaces of many engineers.

ABB is a leading global engineering company that energizes the transformation of society and industry to achieve a more productive, sustainable future. By connecting software to its electrification, robotics, automation and motion portfolio, ABB pushes the boundaries of technology to drive performance to new levels. With a history of excellence stretching back more than 130 years, ABB's success is driven by 110,000 talented employees in over 100 countries.

ABB Electric

Dc To Ac Converter,Inverter For Home ,Pure Sine Wave Inverter,Car Inverter

Wuxi Trenty Machinery & Equipment Co., Ltd. , https://www.elec-inverter.com