In this article, the editor of Downcodes will introduce the RS-485 protocol in detail, including its definition, characteristics, network design, and connection methods. As a commonly used serial communication standard, the RS-485 protocol is widely used in industrial control, data acquisition and other fields. Compared with RS-232, it has stronger anti-interference ability, longer transmission distance and multi-station capability, making it the preferred solution in many application scenarios. Below we will delve into various aspects of the RS-485 protocol to help readers better understand and apply this technology.
The 485 protocol refers to the RS-485 protocol, which is the standard for serial communication; typical serial communication standards are RS232 and RS485, which define voltage, impedance, etc., but do not define the software protocol. A positive level between +2V and +6V represents one logic state; a negative level between -2V and -6V represents another logic state.
The 485 protocol refers to the RS-485 protocol, which is the standard for serial communication; typical serial communication standards are RS232 and RS485, which define voltage, impedance, etc., but do not define the software protocol. The positive level is between +2V and +6V, indicating one logic state; the negative level is between -2V and -6V, indicating another logic state; the negative level is between -2V and -6V, indicating another logic state. A logical state; digital signals adopt differential transmission, which can effectively reduce the interference of noise signals.
1. Electrical characteristics of RS-485: Logic "1" is represented by the voltage difference between the two lines as + (2-6) V; logic "0" is represented by the voltage difference between the two lines as - (2-6) V . The interface signal level is lower than RS-232-C, which makes it less likely to damage the chip of the interface circuit. Moreover, the level is compatible with the TTL level and can be easily connected to the TTL circuit.
2. The maximum data transmission rate of RS-485 is 10Mbps.
3. The RS-485 interface is strong, which means it has good anti-noise interference.
4. The standard maximum transmission distance of the RS-485 interface is 4000 feet, which can actually reach 3000 meters (theoretical data, in actual operation, the limit distance is only about 1200 meters), and the RS-232-C interface is Only 1 transceiver is allowed to be connected to the bus, which is single station capability. The RS-485 interface allows up to 128 transceivers to be connected to the bus. That is, it has multi-station capability, so users can easily establish a device network using a single RS-485 interface.
Because the RS-485 interface has good immunity to noise interference, long transmission distance and multi-station capability, it becomes the preferred serial interface. Because a half-duplex network composed of an RS485 interface generally only requires two connections, the RS485 interfaces all use shielded twisted pairs for transmission. The RS485 interface connector uses a DB-9 9-pin plug socket, the RS485 interface with the smart terminal uses DB-9 (hole), and the keyboard interface RS485 connected to the keyboard uses DB-9 (pin).
Further reading:
The RS485 transceiver circuit design uses the SBUS multi-master protocol to complete the design of a multi-channel temperature acquisition system. The common serial port RS-232 standard is not suitable for this communication system due to its short communication distance and low speed, while the RS-485 standard makes up for this shortcoming. Therefore, the physical layer transceiver design uses the MAX485 chip.
The Rs485 transceiver has two enable terminals. The receive enable terminal is grounded, and the transmit enable terminal is controlled by the 51 microcontroller. Therefore, the host is always in the receiving state when it is idle, and when it needs to send data, just enable the transmit terminal. In addition, in order to realize the monitoring of the bus, the serial port receiving end is connected to the external interrupt INT0 of the microcontroller through a Schmitt trigger, so that the interrupt can be used to determine whether the bus is busy.
In RS-485 communication network, 485 transceiver is usually used to convert TTL level and RS485 level. The serial port controller in the node uses RX and TX signal lines to connect to the 485 transceiver, and the transceiver is connected to the network bus through differential lines. TTL signal transmission is generally used between the serial port controller and the transceiver, and between the transceiver and the bus. Differential signals are transmitted. When sending data, the TX signal of the serial port controller is converted into a differential signal by the transceiver and transmitted to the bus. When receiving data, the transceiver converts the differential signal on the bus into a TTL signal and transmitted to the serial port controller through the RX pin. Usually there can only be one master among these nodes, and the rest are all slaves. A 120 ohm matching resistor is added to the starting and ending ends of the bus.
The above is the content about the 485 protocol. I hope it will be helpful to everyone.
I hope the explanation by the editor of Downcodes can help everyone understand the RS-485 protocol. In practical applications, it is also necessary to select appropriate transceiver chips and communication parameters according to specific needs. If you have any questions, please leave a message in the comment area!