RS232 overview
The RS-232 interface complies with the interface standard for serial data communication established by the Electronic Industries Alliance (EIA). The original number is EIA-RS-232 (232, RS232 for short). It is widely used for computer serial interface peripheral connections. Connect cables and mechanical, electrical characteristics, signal functions and transfer processes.
The data transmission rate specified by the RS-232-C standard is 50, 75, 100, 150, 300, 600, 1200, 2400, 4800, 9600, 19200 baud per second.
RS232 features:
RS-232 is one of the mainstream serial communication interfaces. Due to the early appearance of the RS232 interface standard, it is inevitable that there are deficiencies, mainly the following four points:
(1) The signal level of the interface is high, which is easy to damage the chip of the interface circuit. The voltage of any signal line on the RS232 interface is in a negative logic relationship. That is: the logic "1" is -3 - 15V; the logic is "0": +3 - +15V, and the noise margin is 2V. That is, the receiver is required to recognize a signal higher than +3V as a logic "0", a signal lower than -3V as a logic "1", a TTL level of 5V as a logic positive, and 0 as a logic negative. Incompatible with the TTL level, a level shifting circuit is required to connect to the TTL circuit.
(2) The transmission rate is low. In asynchronous transmission, the bit rate is 20Kbps; therefore, in the 51CPLD development board, the integrated program baud rate can only be 19200, which is also the reason.
(3) The interface uses a signal line and a signal return line to form a common ground transmission form. This common ground transmission is prone to common mode interference, so the noise immunity is weak.
(4) The transmission distance is limited. The maximum transmission distance is 50 feet. In fact, it can only be used at about 15 meters.
RS485 overview
The RS-485 serial bus is widely used when the communication distance is required to be several tens of meters to several kilometers. RS-485 uses balanced transmit and differential receive, so it has the ability to reject common-mode interference. In addition to the high sensitivity of the bus transceiver, it can detect voltages as low as 200mV, so the transmitted signal can be recovered beyond the kilometer.
RS-485 uses half-duplex operation. Only one point can be sent at any time. Therefore, the transmission circuit must be controlled by the enable signal.
RS485 features:
RS-485 is very convenient for multi-point interconnection and can save many signal lines. Applications RS-485 can be networked to form a distributed system that allows up to 32 drives and 32 receivers to be connected in parallel. In response to the shortcomings of RS-232-C, the new standard RS-485 has the following features:
(1) Electrical characteristics of RS-485: The logic "1" is represented by the voltage difference between the two lines +2V~+6V, and the logic "0" is represented by the voltage difference between the two lines -6V~-2V. The interface signal level is lower than RS-232-C, and it is not easy to damage the interface circuit chip, and the level is compatible with the TTL level, which is convenient for connection with the TTL circuit.
(2) The maximum data transmission rate is: 10Mbps
(3) The RS-485 interface adopts a combination of balanced driver and differential receiver, which has strong anti-common mode interference capability, that is, good anti-noise performance.
(4) The maximum transmission distance of the RS-485 interface is 4000 feet, which is actually up to 3000 meters.
(5) The RS-232-C interface allows only one transceiver to be connected to the bus, ie single-station capability; while the RS-485 interface allows only up to 128 transceivers to be connected on the bus, ie multi-station capability, so that the user The device network can be easily established using a single RS-485 interface.
RS422 overview
The full name of the RS-422 standard is "the electrical characteristics of the balanced voltage digital interface circuit", which defines the characteristics of the interface circuit. There is actually a signal ground, a total of 5 lines. Since the receiver uses high input impedance and the transmission driver has a stronger driving capability than RS232, it is allowed to connect multiple receiving nodes on the same transmission line, and up to 10 nodes can be connected. One master device (Master) and the rest slave devices (Slave), the slave devices cannot communicate with each other, so RS-422 supports point-to-multidirectional two-way communication. The receiver input impedance is 4k, so the maximum load capacity of the transmitter is 10 & TImes; 4k + 100Ω (terminating resistor).
The RS-422 and RS-485 circuits have basically the same principle. They are sent and received in differential mode, and no digital ground is required. Differential operation is the root cause of the long transmission distance under the same rate condition. This is the fundamental difference between the two and RS232, because RS232 is a single-ended input and output, and at least digital ground is required for duplex operation. Send line and accept line three lines (asynchronous transmission), you can also add other control lines to complete synchronization and other functions.
RS-422 can work and receive without full-duplex operation through two pairs of twisted pairs. RS485 can only work half-duplex, and transmission and reception cannot be performed at the same time, but it only needs one pair of twisted pairs. RS422 and RS485 can transmit 1200 meters at 19kpbs. A device can be connected to the new transceiver line.
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 (Y, Z) and two receptions (A, B). Since the reception and transmission of RS-422 are separate, it can be simultaneously received and transmitted (full duplex); RS-485 has 2 signal lines: transmission and reception.
RS422 features:
Since the RS-422 four-wire interface uses separate transmit and receive channels, there is no need to control the data direction. Any necessary signal exchange between devices can be done in software mode (XON/XOFF handshake) or hardware mode (a pair of separate pairs). Stranded wire). The RS-422 has a maximum transmission distance of 4000 feet (about 1219 meters) and a maximum transmission rate of 10 Mb/s. The length of the balanced twisted pair is inversely proportional to the transmission rate, and it is possible to reach the maximum transmission distance below the 100 kb/s rate. The highest rate transmission is only possible at very short distances. The maximum transmission rate that can be obtained on a typical 100-meter twisted pair is only 1 Mb/s.
RS-422 requires a terminating resistor that requires a resistance equal to approximately the characteristic impedance of the transmission cable. In the short-distance transmission, there is no need to terminate the resistance, that is, the terminal resistance is generally not required below 300 meters. The terminating resistor is connected to the farthest end of the transmission cable.
The difference between RS-232/RS-422/RS-485
1. RS232 is full-duplex, RS485 is half-duplex, and RS422 is full-duplex.
2, RS485 and RS232 are only the physical protocol of communication (ie interface standard), RS485 is the differential transmission mode, RS232 is the single-ended transmission mode, but the communication program does not have much difference.
The PC is already equipped with RS232, which can be used directly. If RS485 communication is used, it is only necessary to connect a RS232 to RS485 conversion head on the RS232 port, and there is no need to modify the program.
Is there a difference in the appearance of the RS232/RS422/RS485 interface?
Generally, it is DB9, there are others, or you have to look at the inside line to know which one is rs232 rs422 rs485.
RS-232 only allows one-to-one communication (single station capability)
The RS-485 interface allows up to 128 transceivers on the bus (with multi-station capability)
Since the default of the PC only has the RS232 interface, there are two ways to get the RS485 circuit of the PC host computer:
(1) Convert RS232 signal of PC serial port into RS485 signal through RS232/RS485 conversion circuit. For industrial environment with complicated situation, it is best to use anti-surge with isolation product.
(2) Through the PCI multi-port serial card, the output signal can be directly selected as an RS485 type expansion card.
The computer connects multiple 485 devices (access controllers) in turn through the RS232-RS485 converter, and polls the devices on the bus in turn.
The wiring label is 485+485-, corresponding to 485+485- of the link device (controller).
Communication distance: The distance between the farthest device (controller) and the computer is theoretically 1200 meters. It is recommended that the customer control within 800 meters and the best control within 300 meters. If the distance is too long, you can purchase 485 repeater (extension) (please buy it from a professional converter manufacturer, where the repeater is placed in the middle of the bus or start, please refer to the manufacturer's manual.) The repeater can theoretically be extended to 3000 meters.
The number of loads: how many devices (controllers) a 485 bus can carry. This depends on the selection of the communication chip of the controller and the communication chip of the 485 converter. Generally, there are 32, 64, 128, and 256 This kind of choice, this is the theoretical number. In actual application, according to the scene environment, communication distance and other factors, the number of loads does not reach the number of indicators. The micro-farming company controller and converter are designed in 256 units, and it is actually recommended that the customer control each bus within 80 units.
485 communication bus (must twisted pair, or one of the network cables), if you use ordinary wires (no twisted pair), the interference will be very large, communication is not smooth, and even communication is not possible.
Send your message to us:
Post time: Jun-25-2019