How do I distinguish between a direct connection and a cross connection?

Source: Internet
Author: User

The connection string is also divided into two parts: pass-through and cross. The connection is generally used to prolong the connection between the PC and the device. 2, 3, and 5 are connected to 2, 3, and 5 respectively, because the PC is generally a public head, most of the devices are headers, so they are common and can be used for extension or connection. Crossover is generally used for connection between PCs, set 2 to 3, 3 to 2, 5 to 5. Generally, both ends are mother-headed!

Before the computer appeared, EIA set the RS232 standard for connecting to the serial device. After a PC machine appears, the existing serial port equipment becomes a PC peripheral, And the RS232 standard is used naturally. At present, the serial communication interface of PC machine adopts EIA-RS-232C standard, C represents the latest modification in 1969. EIA-RS-232C standards for electrical properties, logical electrical and various signal line functions are defined. The EIA-RS-232C standard uses positive and negative voltage to represent the logical state, in the data signal line if the voltage in-3v ~ -15 V indicates logic 1. If the voltage is between + 3 V and ~ + 15 V indicates that the logic is 0. If the voltage on the control signal line is-3 V ~ -15 V indicates the disconnection status. If the voltage is between 3 V and 3 V ~ + 15 V indicates the connection status. Between-3 V and ~ The voltage between + 3 V and below-15 V and above + 15 V is meaningless.
While the CPU and terminal adopt TTL level and positive logic. The TTL level uses + 5 V to indicate the logic 1 and 0 V to indicate the logic 0. They are not compatible with the level and negative logic adopted by the EIA, it must be converted in the interface circuit. The EIA-RS-232C standard does not define the physical characteristics of the connector. As a result there are various types of connectors for the DB-25, DB-15 and DB-9, The COM1 and com2 serial interfaces for the PC machine adopt the DB-9 connector. The ELA-RS-232C standard allows a wire length of 15 m when the error rate is less than 4%. In practical application, when 9600b/s and common twisted pair Shielding Wires are used, the transmission distance can reach 30 m ~ 35 m. The DB-9 connector for the COM1 and com2 serial interfaces of the PC is a public (needle) header that provides nine pin functions for asynchronous communication. They are: ① foot (DCD) data carrier detection, ② foot (rxd) receives data, ③ foot (txd) sends data, and ④ foot (DTR) data terminal preparation, ⑤ foot (SG) signal location, 6 feet (DSR) data device ready, 7 feet (RAS) request sent, 3 feet (CTS) Clear sent, 3 feet (RI) ring tone indication. DB-9 male (needle) Head arrangement order such as left, DB-9 mother (hole) Head arrangement order such as right, pay special attention to the male head pin number from sit to right, Mother head is from right to left. In the EIA-RS-232C standard, there are three transmit signals: txd, RTS and DTR, each line of the typical output current is ± 8mA/± 12 V. Generally, the power supply is about 192 mW.


The PC end generally has a public header,

In combination with the preceding instructions, if modem is not involved. Serial data transmission can be achieved as long as there is a receiving data terminal ② foot and a sending data terminal ③ foot. The receiving data end of one device should be connected to the sending data end of another device. That is, the receiving and sending are overlapping and the signal is connected accordingly.

Question 1: When to use crossover and when to use direct connection?
The Standard Serial Port Pin 2 is RX, and Pin 3 is TX (that is, the 9-pin Serial Port 2 is connected to the rxd pin of the master chip, pin 3 is connected to the txd pin of the main control chip). If the serial port of the Single Chip Microcomputer Development Board and the serial port of the computer are both standard serial ports, the two serial ports should be connected using a crossover line. However, in real life, there are many direct connections (it may be that there is no cross-line trouble in the production of direct connections). In order to cooperate with the use of direct connections, in the drawing board, connect the rxd pin of the main control chip to the three-pin serial port, and the txd pin of the main control chip to the two-pin serial port, so that the serial port on this development board is not a standard serial port, that is to say, 2 is changed to TX, 3 is changed to RX, and the direct connection should be used when connecting to the standard serial port. Check whether the serial port on a development board is a standard serial port or a non-standard serial port. It depends on how the schematic diagram is connected!

In general: RS232 DB-9 interface connection line includes three: Public mother, public, Mother. These three connection lines have cross lines and direct lines respectively, so there are 6 connection methods in total.

Question 2: How to identify cross-string and direct-line connections?
Test with A multimeter. If the General Principles of 2, 2, 3, and 3 are directly connected to the serial line; if the two and 3 connections, the general principles of 3 and 2 are crosstab lines.
Some people are confused that the outside of the mother port is an insulating rubber. How can I test if A multimeter cannot be inserted? Cut a small piece of solder wire (I have also considered using wire, but the wire is too thin, we cannot ensure it can be in good contact with the metal part of the mother port, the solder wire is a little thick, can be in good contact with the metal in the mother mouth), and then the multimeter probe in contact with the soldering wire to test.
Of course, if a multimeter is used to test whether a serial cable is directly connected or cross each time you get it, isn't it very troublesome? It's a good way to easily identify it, that is: the two mother ports are cross, and one master and one mother are directly connected. (There seems to be very few serial lines with both public ports)

Note: we strongly recommend that you do not enable the serial port for live plug-in. At least one end of the plug-in is powered off. Otherwise, the serial port is vulnerable to damage.

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.