First you need to know what is RS232 and RS485.
Typical serial communication standards are RS232 and RS485. They define voltages, impedances, and so on. But no definition of software agreement
Distinguished from RS232, RS485 features include:
1. Electrical characteristics of RS-485: Logic "1" is expressed as a voltage difference between two lines + (2-6) v, and the logic "0" is expressed as a voltage difference between two lines-(2-6) v. The interface signal level is lower than the rs-232-c, it is not easy to damage the chip of the interface circuit, and the level is compatible with the TTL level, which can be conveniently connected with the TTL circuit.
2. The maximum transmission rate of RS-485 data is 10Mbps
3. The RS-485 interface is a combination of a balanced drive and a differential receiver, which enhances the resistance to common-mode dry capability, i.e., good noise-interference resistance.
4. The maximum transmission distance of the RS-485 interface is 4000 feet, which can actually reach 3000 meters, and the other RS-232-C interface is only allowed to connect 1 transceivers on the bus, that is, the single station capability. The RS-485 interface is allowed to connect up to 128 transceivers on the bus. That is, multiple station capabilities, so that users can use a single RS-485 interface to easily set up a device network. Because the RS-485 interface has good anti-noise interference, long transmission distance and multiple station capability, the above advantages make it the preferred serial interface. Because the RS485 interface is composed of Half-duplex network, generally need only two lines, so the RS485 interface is used shielded twisted pair transmission. RS485 interface Connector using DB-9 9-pin plug, and intelligent terminal RS485 interface with DB-9 (hole), keyboard connection with the keyboard interface RS485 using DB-9 (needle).
RS485 programming
Serial protocol only defines the transmission voltage, impedance, and so on, programming way and ordinary serial port programming same.
The conversion principle and connection between RS-232 and RS-422
Usually we for video server, VCR, switchboard, such as direct broadcast, switching control mainly using serial port, mainly used to RS-232, RS-422 and RS-485 three kinds of interface control. The following port interface standards and use and external plug-ins and cables to explore.
RS-232, RS-422 and RS-485 standards only provide for the electrical characteristics of the interface, and do not involve connectors, cables or protocols, on the basis of which users can establish their own high-level communications protocol. For example: Video server with multiple RS422 serial communication interface, each interface through the RS422 communication line by the external computer control to achieve record and playback. In addition to providing a variety of control hardware interface, video server also provides protocol interface, such as RS422 interface, in addition to supporting the RS422 profile protocol, also supports Louth, Odetics, BVW, etc. through the RS422 control protocol.
RS-232, RS-422 and RS-485 are both serial data interface standards, developed and published by the Electronic Industry Association (EIA), RS-232 released in 1962. RS-422 is developed by RS-232, in order to improve the RS-232 communication distance, low rate of disadvantage, RS-422 defined a balanced communication interface, the transfer rate to 10Mbps, the transmission distance extended to 4000 feet (speed lower than 100Kbps), and allows up to 10 receivers to be connected on a single balanced bus. The RS-422 is a one-way, balanced transmission specification, which is named Tia/eia-422-a Standard, which is sent by single machine and received by multiple machines. To extend the scope of the application, EIA in 1983 on the basis of the RS-422 set up a RS-485 standard, adding more points, two-way communication capabilities, that is, allow multiple senders connected to the same bus, while increasing the transmitter's drive and conflict protection characteristics, extended the bus common-mode range, named after the tia/ Eia-485-a Standard.
1. S-232 Serial Interface Standard
At present, RS-232 is one of the most widely used serial interfaces in PC and communication industry. RS-232 is defined as a single-ended standard for increasing communication distances in a low rate serial communication. RS-232 adopts unbalanced transmission mode, which is called single-ended communication. The data signal of receiving and originating is relative to the signal land. The typical RS-232 signal swings between positive and negative levels, sending the data, sending the driver output positive flat in +5~+15v, negatively flat at -5~-15v level. When there is no data transmission, the line is TTL, from the beginning to transmit data to the end, the line level from the TTL level to the RS-232 level and then return the TTL level. The typical working level of the receiver is +3~+12v and -3~-12v. Because the transmission level and the difference between the receiving level is only 2V to 3V, so the common-mode inhibition ability, coupled with the distribution of twisted-pair capacitance, the maximum transmission distance of about 15 meters, the highest rate of 20Kbps. RS-232 is designed for point-to-point (that is, only a pair of receiving and sending devices), and its drive load is 3kω~7kω. So RS-232 is suitable for communication between local devices.
2. RS-422 and RS-485 serial interface standard
(1) Balanced transmission
RS-422, RS-485 and RS-232 are not the same, the data signal using differential transmission, also known as the balanced transmission, it uses a pair of twisted pair, the first line is defined as a, the other is defined as B. Typically, sending a positive balance between A and B in +2~+6v is a logical state, negatively flat in -2v~6v, and is another logical state. Another signal to C, in the RS-485 also has a "enabling" side, and in the RS-422 this is usable. The "enabling" side is used to control the disconnection and connection between the sending drive and the transmission line. When "enabling" ends, the sending driver is in a high resistance state, called a "third State", i.e. it is different from the third state of the logic "1" and "0".
(2) RS-422 electrical regulations
Because the receiver uses high input impedance and a more powerful drive than RS232, it allows to connect multiple receive nodes on the same transmission line, up to 10 nodes. That is, one main device (master), the rest from the device (salve), from the device can not communicate, so RS-422 support point-to-point two-way communication. RS-422 four-line interface because of the use of separate send and receive channels, so do not have to control the direction of the data, each device must be any signal exchange between the software (Xon/xoff handshake) or hardware (a pair of separate twisted pair) to achieve. The maximum transmission distance of the RS-422 is 4000 ft (about 1219 m) and the maximum transmission rate is 10Mbps. The length of the balance twisted pair is inversely proportional to the transmission rate, and the maximum transmission distance can be reached under the 100Kbps rate. The highest rate of transmission can be achieved only at a very short distance. The maximum transmission rate for a 100-metre-long twisted pair is only 1Mbps. RS-422 need a final resistor, the resistance is about equal to the characteristic impedance of the transmission cable. In the moment distance transmission can not be the end of the resistor, that is generally under 300 meters do not need the final resistor. The terminal resistor is connected to the farthest end of the transmission cable.
(3) RS-485 electrical regulations
Because the RS-485 is developed from the RS-422 Foundation, so RS-485 many electrical regulations and RS-422 similar. If all uses the balanced transmission way, all needs in the transmission line to connect the final connection resistance and so on. RS-485 can be used two-line and four-wire mode, the second-tier system can achieve real multiple-point two-way communication. RS-485 bus, when the requirement communication distance of dozens of meters to thousands of meters, widely used RS-485 serial bus standards. RS-485 has the ability to suppress common-mode interference by using balanced transmission and differential reception. Coupled with the high sensitivity of the bus transceiver, can detect low to 200mV voltage, so the transmission signal can be recovered outside the kilometer. RS-485 using Half-duplex mode, at any time only a bit in the sending State, therefore, the transmission circuit must be controlled by the enabling signal. RS-485 is convenient for multiple interconnect and can save many signal lines. Application RS-485 can be networked to form distributed systems that allow up to 32 drives and 32 receivers. The difference between RS-485 and RS-422 is that the common-mode output voltage is different, the RS-485 is between -7v and +12v, and RS-422 between -7v and +7v; The RS-485 satisfies all RS-422 specifications, so RS-485 drives can be used in RS-422 networks. RS-485 and RS-422, the maximum transmission distance of about 1219 meters, the maximum transmission rate of 10Mbps. The length of the balance twisted pair is inversely proportional to the transmission rate, and it is possible to use the longest cable length under the 100Kbps rate. The highest rate of transmission can be achieved only at a very short distance. In general, the maximum transmission rate of the 100-meter long twisted pair is 1Mbps.
(4) Points for attention of network installation of RS-422 and RS-485
RS-422 can support 10 nodes, RS-485 support 32 nodes, so multiple nodes form a network. The network topology generally uses the terminal matching general line structure, does not support the ring or the star network. When you build your network, you should be aware of the following points:
* Using a twisted pair of cable as the bus, the nodes are strung together, the length of the lead line from the bus to each node should be as short as possible so that the reflected signal in the extraction lines has the lowest impact on the bus signal.
* Attention should be paid to the continuity of the bus characteristic impedance, the reflection of the signal will occur at the point of impedance discontinuity. This discontinuity can occur in the following situations: Different sections of the bus have different cables, or a segment of the bus has too many transceivers close to the installation, and then the long Branch line leads to the bus.
In short, a single, continuous signal channel should be provided as the bus.
Type and conversion of two serial port sockets
The serial port is an interface standard, it stipulates the electrical standard of the interface, simply say just a standard of the physical layer. Does not specify the interface plug-in cable and the use of the Protocol, so long as we use the interface plug-in cable to meet the standard of the actual use of flexible, in the serial port Interface standards using a variety of protocols for communication and equipment control.
The above we understand the serial port protocol, and our daily work in contact with the most is the actual equipment of the external interface, how we know from the shape that it is that kind of interface. Make a definition of how the cables are each stitch. We know that. Serial RS-232, RS-422 and RS-485 standard only to the electrical characteristics of the interface to make provisions, and does not involve connectors, cables or protocols, on the basis of which users can establish their own high-level communications protocol. From our actual work encountered in the use of the most of the socket has three kinds of DB9 DB25 RJ45, above three kinds of plug plug-ins can be used as a serial port plug plug-in, can also be through the cable to the switch between the socket. Below we have three kinds of sockets for the definition of the PIN, three sockets between the conversion also as long as the socket defined by the cable to jump.
* DB9 (9 pin socket sockets), as shown in Figure 2. The 9-pin serial port function is shown in table 1.
* DB25 (25 pin socket sockets), as shown in Figure 3. The 25-pin serial port function is shown in table 2.
* There is also a socket is RJ45, such as Hubei Taiwan use of high mss1600, mss700 Video Server codec board control port for the serial port, the socket is RJ45, and the serial port of the broadcast control machine is DB9, so we need to use the conversion cable. The PIN definition of the switch cable is as shown in Figure 4.
RS485 Half-duplex connection is: rx+ and tx+ parallel for data+;rx-and tx-parallel for data-. RS485 Full Duplex/rs422 connection is: Fully and GND short, signal line is rx+,tx+,rx-,tx-, can be connected to GND as needed.
The extension of the three serial ports
The expansion of the serial port, we know that generally a computer has two serial port, and for a broadcast control computer needs to control more than two devices, we need to control the video server, VCR, switchboard, subtitle machines and other equipment. So we need to expand the serial port, we can use the serial expansion card to expand the serial port, such as our broadcast control system used in the serial expansion card moxa CI-134.
MOXA CI-134 is a rs-422/485 four serial card designed for industrial environment communication applications. It supports 4 separate rs-422/485 serial ports, with a maximum of 128 devices under the control of a One-to-many communication application. To make the RS-485 2-line Half-duplex operation easier, each CI-134 card has data flow control (ADDC), without software operation. Therefore, the RS-485 Half-duplex protocol can be controlled without additional coding in Windows application. In order to meet the requirements of industrial environment for high reliability products, this series of products provides optional photoelectric isolation (2 kv) and surge protection (KV ESD) function.
Features of the product include: Optional photoelectric Isolation (2KV) and surge protection (25KV ESD) function, providing data flow control ADDC (Automatic Data Direction control) function; RS-485 data controls L:ADDC or through RTS control , built-in terminal resistor, chip hardware flow control to ensure data not lost, using advanced ASIC design, low reworks, support many common operating systems.
Application of four serial ports in broadcast control system
We know that the serial port RS232 effective transmission distance of 15 meters, RS-422 Maximum transmission distance of 4000 feet (about 1219 meters), the maximum transmission rate of 10Mbps. We broadcast the use of video recorders such as DVCPRO, IMX control interface with RS232, RS422 multiple interfaces to choose from, if the use of Pin9 for the RS422 interface, video server codec control is the RS422 interface, but the socket for the RJ45 is not DB9, Conversion of cables is required. Therefore, we in control according to the above characteristics can be flexible to use, we because of the need for the main control switch, as well as the distance to consider the unified selection of RS422 switching switch, control RS422 switching switch for the RS232 control interface, which directly from the broadcast control of the COM port to control the switching switch, Other control video recorder, switchboard, video server codec card using MOXA Card extended RS422 interface into the RS422 switching switch for switching. The control figure is shown in Figure 5.
The whole system only RS422 switching open control is the broadcast control of the COM (RS232), the other is Moxa card expansion of the RS422 interface, due to emergency switch needs RS232 so in front of the emergency switch plus a RS422 to RS232 converter. Through the control line broadcasting machine can be issued in a timely manner, and can also read the VCR, switch, and video server status. The above is only the system control diagram of the computer room. The system control of the upload and master control room is roughly the same as this.
RS422 bus, RS485 and RS422 circuit principles are basically the same, are sent and received in a differential mode, do not need digital ground. The differential operation is the fundamental reason for the distance of transmission under the same rate condition, this is exactly the difference between the two and RS232, because RS232 is a single-ended input and output, duplex work requires at least digital ground, send line and accept line three lines (asynchronous transmission), but also with other control line to complete synchronization functions. RS422 through two pairs of twisted pair can be used to send and receive each other, while the RS485 can only half duplex work, the delivery can not be carried out at the same time, but it only needs a pair of twisted pair. The above three kinds of interfaces have shortcomings, in the actual work can be flexibly selected according to the need.
The application of computer control in radio and TV broadcasting and control system will be more and more extensive. And with the continuous development of computer technology, intelligence will continue to improve, the system will be even greater, which requires us to more in-depth understanding of the basic theory of computers, so as to more in-depth understanding of the system, maintenance systems, to ensure the safe and stable operation of the system, Better guarantee of safe broadcasting.
References: http://www.tvpro.com.cn/jxlt/20060106/4541.html
RS-232 on the market switch to RS-485, passive and active two kinds
Passive is generally only a conversion, the active converter in addition to the implementation of 232 and 485 conversion, but also to ensure the electrical isolation between the two. Because 485 of the line is often longer, there is interference on the line, the adoption of isolation measures even if the 485 line interference will not affect the 232 side. can go to http://www.232-485.com/to see, refer to
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.