The difference between RS485 and RS232

1. For software, 485 communication and serial port communication are the same thing, both are operating serial ports. The two are just differences in hardware, and have nothing to do with software. The so-called 485 communication is just adding a converter to the serial port, it's that simple.

 

2. The difference between RS485 and RS232 is actually not that big, and the transmission method is the same.
The difference is: RS485 is differential (differential signal) transmission, and RS232 is non-differential (same signal) transmission.
Therefore, RS485 transmission signal interference and interference ability is stronger than RS232, so the transmission distance is farther than RS232.
As far as programming is concerned, there is no difference with RS232. For the computer, if the 485 communication is carried out on the 232 serial port,
an RS232/RS485 conversion module must be added.

 

3. The general 485 card is actually an RS-232 interface card, but this RS-232 interface card directly has the function of converting RS-232 level to RS-485 level.
On the PC motherboard, there are usually Com1 and Com2. After plugging in the 485 card, there will be Com3, Com4.......
So the programming is exactly the same as Com1\Com2.

 

4.485 is half-duplex communication, why use 485? Because 232 can only be point-to-point, and 485 can be one-to-many (one master and multiple slaves), and the current loop method used by 485 has strong interference and long transmission distance (232 is a voltage signal, usually 10 meters is almost the same , 485 can theoretically reach 1000 meters, but I actually better not exceed 600 meters, the speed is below 9600). 232 is at least 3-wire, sending and receiving ground, and 485 is 2-wire mode (so-called A/B line).

 

5. Physical interface and communication protocol are two different things. Although some protocols require certain physical interface support, such as MODBUS/HART commonly used in industry, it can be used on 232/485 or on TCP/IP interface.

 

6. The serial ports of desktop computers are all RS232, and there are two kinds of serial ports of 232 and 485 defined by pins.

One is 9-pin and the other is 25-pin. The difference between 232 and 485 is the difference between the two communication distances. The 232 serial interface can only support a range of 15 meters, and 485 can be extended to 1200 meters.

Guess you like

Origin blog.csdn.net/liuyuinsdu/article/details/114241278