The RS-232 interface conforms to the serial data communication interface standard defined by the Electronic Industries Alliance (EIA). The original serial number is EIA-RS-232 (232, RS232). It is widely used for computer serial interface peripheral connections. Connect cables and mechanical, electrical characteristics, signal functions, and transmission processes.
The RS-232-C standard specifies data rates of 50, 75, 100, 150, 300, 600, 1200, 2400, 4800, 9600, and 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 in the following four points:
(1) The signal level of the interface is high and the chip of the interface circuit is easily damaged. The voltage of any one of the signal lines of the RS232 interface is a negative logic relationship. That is: logic "1" is -3-15V; logic "0": +3-V15V, noise margin is 2V. That is, the receiver is required to recognize the signal higher than +3V as logic "0", the signal lower than -3V as logic "1", the TTL level as 5V is logic positive, and 0 is logic negative. It is incompatible with the TTL level, so it is necessary to use a level shift circuit to connect with the TTL circuit.
(2) The transmission rate is relatively low. In asynchronous transmission, the bit rate is 20 Kbps. Therefore, in the 51 CPLD development board, the baud rate of the integrated program can only be 19200. This is also the reason.
(3) The interface uses a signal line and a signal return line to form a common ground transmission mode. This common ground transmission is prone to common-mode interference, and therefore has weak noise immunity.
(4) The transmission distance is limited. The maximum transmission distance standard value is 50 feet. In fact, it can only be used for about 15 meters.
When the communication distance is required to be several tens of meters to 1000 meters, the RS-485 serial bus is widely used. RS-485 uses balanced transmission and differential reception, so it has the ability to suppress common-mode interference. In addition to the bus transceiver's high sensitivity, it can detect voltages as low as 200mV, so the transmitted signal can be recovered beyond a few kilometers.
RS-485 uses a half-duplex mode of operation. Only one point can be in a transmission state at any time. Therefore, the transmission circuit must be controlled by an enable signal.
RS485 features:RS-485 is very convenient for multi-point interconnections, eliminating many signal lines. Application of RS-485 can be networked to form a distributed system that allows up to 32 drives in parallel and 32 receivers. For the shortcomings of RS-232-C, the new standard RS-485 has the following characteristics:
(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 that of RS-232-C, and it is not easy to damage the interface circuit chip, and this level is compatible with the TTL level, and it is convenient to connect with the TTL circuit.
(2) The maximum data transmission rate is: 10Mbps
(3) The RS-485 interface uses a combination of a balanced driver and a differential receiver, which has strong resistance to common-mode interference, that is, it has good anti-noise performance.
(4) The maximum transmission distance standard value of the RS-485 interface is 4,000 feet, which is actually 3,000 meters.
(5) The RS-232-C interface allows only one transceiver to be connected on the bus, ie single-station capability; while the RS-485 interface allows only up to 128 transceivers to be connected on the bus, ie it has multi-station capability. A single RS-485 interface can be used to easily establish a network of devices.
The full name of the RS-422 standard is "Electrical Characteristics of a 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 a high input impedance and the transmission driver has stronger driving capability than RS232, multiple receiver nodes can be connected on the same transmission line, and up to 10 nodes can be connected. One master device (Master) and the rest slave devices (Slave). Slave devices cannot communicate with each other. Therefore, RS-422 supports point-to-multipoint two-way communication. The input impedance of the receiver is 4k, so the maximum load capacity of the transmitter is 10 & TImes; 4k + 100Ω (terminating resistor).
The principle of RS-422 and RS-485 circuits is basically the same. They are all transmitted and received in differential mode, and do not require digital ground. Differential operation is the root cause of the transmission distance in the same rate condition, which is the fundamental difference between the two and RS232, because RS232 is a single-ended input and output, duplex operation requires at least digital ground. Send line and acceptance line three lines (asynchronous transmission), you can also add other control lines to complete synchronization and other functions.
RS-422 can work in full-duplex through two pairs of twisted pair transceivers without affecting each other, and RS485 can only work in half-duplex, can not send and receive at the same time, but it only requires a pair of twisted pair. RS422 and RS485 can transmit 1200 meters at 19kpbs. The device can be connected on the new transceiver line.
RS-422 has exactly the same electrical properties as RS-485. The main difference is that RS-422 has four signal lines: two transmit (Y, Z) and two receive (A, B). Since RS-422's receive and send are separate, it can receive and send at the same time (full duplex); RS-485 has 2 signal lines: send and receive.
Because the RS-422 4-wire interface uses separate transmit and receive channels, there is no need to control the data direction. Any necessary handshake between devices can be handled either in software (XON/XOFF handshaking) or hardware (pairs of individual pairs) Stranded). The RS-422 has a maximum transmission distance of 4000 feet (about 1219 meters) and a maximum transmission rate of 10Mb/s. The length of the balanced twisted pair is inversely proportional to the transmission rate. Below 100 kb/s, the maximum transmission distance is possible. The highest rate transmission can only be achieved at a short distance. The maximum transmission rate that can be obtained on a typical 100-meter long twisted pair is only 1 Mb/s.
RS-422 requires a terminating resistor and requires a resistance value approximately equal to the characteristic impedance of the transmission cable. Termination resistors are not required for short-distance transmissions, ie no termination resistors are required below 300 meters. The termination 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, RS422 is full duplex.
2. RS485 and RS232 are only the physical protocols for communication (ie, interface standards). RS485 is a differential transmission method. RS232 is a single-ended transmission method, but communication programs do not have much difference.
The PC has been equipped with RS232, and it will be used directly. If RS485 communication is used, just connect an RS232 to RS485 converter on the RS232 port. No need to modify the program.
Is the RS232/RS422/RS485 interface different in appearance?
Usually it is DB9, there are other, still have to look inside the line to know in the end which is rs232rs422rs485.
RS232 is a standard interface. It is a D-shaped 9-pin. The signal definition of the interface of the connected device is the same. The signal is defined as follows:
RS-232 only allows one-to-one communication (single-station capability)
RS-485 interface allows connection of up to 128 transceivers (with multi-station capability) on the bus
Since the PC only has an RS232 interface by default, there are two ways to get the RS485 circuit of the PC's upper computer:
(1) RS232/RS485 conversion circuit through the PC serial RS232 signal into RS485 signal, for the more complex industrial environment is best to use anti-surge isolation Shanshan products.
(2) Through the PCI multi-serial card, the output signal can be directly selected as an RS485 type expansion card.
Through the RS232-RS485 converter, the computer is connected to multiple 485 devices (gate controllers) in turn, and uses polling to communicate with the devices on the bus in turn.
The wiring indication is 485+485-, corresponding to the 485+485- of the linking device (controller).
Communication distance: The theoretical distance from the furthest equipment (controller) to the computer connection is 1200 meters. It is recommended that the customer control within 800 meters, and the best control within 300 meters. If the distance is extremely long, you can purchase 485 Repeater (Extender) (please purchase it from a professional converter manufacturer. The repeater should be placed in the middle of the bus or in the beginning. Please refer to the relevant manufacturer's manual.) Repeaters can theoretically be extended to 3000 meters.
The number of loads: that is, how many devices (controllers) a 485 bus can bring. This depends on the selection of the communication chip of the controller and the communication chip of the 485 converter. There are generally 32 sets, 64 sets, 128 sets, and 256 sets. This choice is a theoretical figure. When it is actually applied, the number of loads does not reach the target number according to the site environment, communication distance, and other factors. Micro-farming company's controllers and converters are designed according to 256 sets. Actually, the customer is recommended to control each bus within 80 sets.
485 communication bus (must use twisted pair, or one of the network cable), if you use ordinary wire (no twist) interference will be very large, poor communication, and even communication is not.
Each controller device must go hand in hand, and there must be no star connection or fork. If there is a star connection or bifurcation, the interference will be very large, communication will be poor, and even communication will not be possible.
SMC Board To Board Connector Section.
Compact high density design
Design of super reliable double beam contact
High speed signal transmission rate up to 3 Gbit / S
Polarization to ensure accurate connection
Locating pin for PCB placement
Welded bracket for secure PCB
Wide operating temperature range
Height range of non matching stack
For full automation board components
SMC Board To Board Connector Section
ShenZhen Antenk Electronics Co,Ltd , http://www.coincellholder.com