Problems with RS232 and RS485 Interfaces

Source: Internet
Author: User

What is a RS-232-C interface? What are the characteristics of the use of RS-232-C interface? How to consider the length of the transmission cable?

A: data transmission between a computer and a computer or between a computer and a terminal can be achieved through serial communication or parallel communication. Because the serial communication method has low line usage and low cost, especially in remote transmission, it avoids the inconsistency of multiple lines. In serial communication, both parties are required to adopt a standard interface, so that different devices can be easily connected for communication. RS-232-C interface (also known as EIA RS-232-C) is currently the most commonly used serial communication interface. In 1970, it was jointly developed by the American Association of Electronic Industry (EIA) and Bell systems, modem manufacturers and computer terminal manufacturers for serial communication. Its full name is "Technical Standard for Serial Binary data exchange interfaces between data terminal devices (DTE) and data communication devices (DCE)", which requires a 25-pin db25 connector, specify the signal content of each pin of the connector and the level of each signal.

(1) The signal content of the interface is actually 25 of the RS-232-C lead many are rarely used, in the computer and terminal communication generally only use 3-9 lead. The signal content of the nine most commonly used RS-232-C leads is shown in Table 1

(2) Electrical Characteristics of the interface in the RS-232-C, the voltage of any signal line is negative logical relationship. That is, the series "1",-5--15 V; logic "0" + 5-+ 15 V. The noise tolerance is 2 v. That is, the receiver is required to be able to identify the signal as low as + 3 V as the logic "0", and the signal as high as-3 V as the logic "1" Appendix 1

Pin No.

Signal name

Symbol

Flow Direction

Function

2

Send data

Txd

DTE → DCE

DTE sends serial data

3

Receive data

Rxd

DTE certificate DCE

DTE receives serial data

4

Send request

RTS

DTE → DCE

DTE requests DCE to switch the line to the sending Method



5

Allowed to send

CTS

DTE certificate DCE

DCE indicates that the DTE line is connected and data can be sent

6

Data device preparation

DSR

DTE certificate DCE

DCE ready

7

Signal Location

   

Common Signals

8

Carrier Detection

DCD

DTE certificate DCE

Indicates that the DCE receives the remote carrier

20

Data Terminal preparation

DTr

DTE → DCE

DTE ready

22

Ringing indicator

Ri

DTE certificate DCE

Indicates that the DCE is connected to the line, and a ringing occurs.

 

(3) the physical structure of the interface RS-232-C INTERFACE connector is generally used for the 25-core DB-25 plug-in, usually in the DCE end, socket in the DTE end. some devices and PCs connected to the RS-232-C interface, because do not use the other side of the transmission control signal, only three interface lines, namely "send data", "receive data" and "signal location ". So the use of DB-9 9-core plug-in, transmission line using shielded twisted pair.

(4) The length of the transmission cable is defined by the RS-232C standard in the case of code distortion less than 4%, the length of the transmission cable should be 50 feet, in fact, the 4% code distortion is very conservative, in practical application, about 99% of users work in the range of 10-20% yuan of code distortion, so the maximum distance in actual use will be far more than 50 feet, the US company dec once stipulated that the experimental results in Appendix 2 should be obtained after the code element distortion is 10%. The No. 1 cable is a shielded cable, and the model is decp. no.9107723, which contains three pairs of twisted pair wires. Each pair is composed of 22 # AWG and is covered with a shielded mesh. No. 2 is a cable without shielding. The model for DECP.NO.9105856-04 is a four-core cable of 22 # AWG. Table 2 lab results of Dec

Baud Rate

1st cable transmission distance (FT)

Distance between cable 2 (feet)

110

5000

3000

300

5000

3000

1200

3000

3000

2400

1000

500

4800

1000

250

9600

250

250

 

2. What is a RS-485 interface? What is its characteristic compared to RS-232-C interface?

A: Because of the early appearance of RS-232-C interface standards, it is inevitable that there are deficiencies, mainly has the following four points:

(1) The signal level value of the interface is high, which is easy to damage the chip of the interface circuit. Because it is not compatible with the TTL level, the level conversion circuit must be used to connect to the TTL circuit.

(2) low transmission rate. During asynchronous transmission, the baud rate is 20 kbps.

(3) The interface uses a signal line and a signal return line to form a co-location transmission mode. This co-location transmission is prone to common-mode interference, so the anti-noise capability is weak.

(4) The transmission distance is limited. The maximum transmission distance is 50 feet. In fact, it can only be used about 50 meters.

For the lack of RS-232-C, so there are some new interface standards, RS-485 is one of them, it has the following characteristics:

1. electrical Properties of RS-485: The logic "1" is expressed by the voltage difference between two wires as + (2-6) V; the logical "0" is represented by the voltage difference between two wires-(2-6) v. The interface signal level is lower than the RS-232-C, it is not easy to damage the interface circuit chip, and the level is compatible with the TTL level, convenient and TTL circuit connection.

2. The highest data transmission rate of the RS-485 is 10 Mbps

3. RS-485 interface is a combination of balanced drive and differential receiver, the common mode dry performance is enhanced, that is, good noise resistance.

4. The maximum transmission distance of the RS-485 interface is 4000 feet, in fact up to 3000 meters, and the RS-232-C interface on the bus can only connect to one transceiver, that is, single station capacity. While the RS-485 interface on the bus is allowed to connect up to 128 transceiver. That is, with multi-site capabilities, so that users can use a single RS-485 interface to easily establish a device network.

Because the RS-485 interface has good anti-noise ratio, long transmission distance and multi-station ability, it becomes the first choice of serial interface. Because the RS485 interface is composed of a half-duplex network, generally only two connections are required, the RS485 interface is used to shield the transmission of twisted pair wires. RS485 interface connector uses DB-9 9-core plug-in seat, and intelligent terminal RS485 interface using DB-9 (hole), and keyboard interface RS485 with keyboard connection DB-9 (needle ).

3. How should I consider the length of the transmission cable when the RS485 interface is used?

A: When the RS485 interface is used, the maximum cable length allowed for transmission of data signals from the generator to the load is a function of data signal rate, this length data is mainly affected by signal distortion and noise. The relationship between the maximum cable length and the signal rate is shown in the following figure: the 24awg copper-core twisted-pair telephone cable (with a wire diameter of 0.51mm), and the cross-line Bypass capacitor is 52.5pf/m, the terminal load resistance is 100 Euro. (Curves are derived from Appendix A of the GB11014-89 ). As shown in the figure, when the data signal rate is reduced to 90 kbit/s, if the maximum allowable signal loss is 6 DBV, the cable length is limited to 1200 m. In fact, the curve shown in the figure is very conservative. In practice, the cable length can be larger than it. When cables with different cable diameters are used. The maximum cable length obtained is different. For example, when the data signal rate is 600 kbit/s, the 24awg cable is used. The figure shows that the maximum cable length is 200 M. If the 19awg cable is used (the wire diameter is 0. 91mm), the length of the cable can be greater than 200 m; If 28awg cable is used (the wire diameter is 0. 32mm), the cable length must be less than 200 m.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.