Serial port basic wiring method

xiaoxiao2021-03-06  38

Http://www.opc-china.com The currently common serial port has 9-pin serial port (DB9) and 25-pin serial port (DB25), and the communication distance is closer (<12m), and the standard RS232 port can be directly connected to the cable. (RS422, RS485 is far away), if the distance is far, additional modems are required. The most simple and commonly used is three-line proceeds, that is, the received data and the transmission data are connected three-footed. This article only involves the most basic connection, and directly connects to RS232.

1, common signal foot instructions for DB9 and DB25

9-pin serial port (DB9) 25-pin serial port (DB25)

Needle number function Description Resert Item Description Rergement 1 Data Series Detection DCD 8 Data Series Detection DCD 2 Receive Data RXD 3 Receive Data RXD 3 Send Data TXD 2 Send Data TXD 4 Data Term Preparation DTR 20 Data Terminal Preparation DTR 5 Signal GND 7 Signal GND 6 Data Equipment Preparation DSR 6 Data Preparation DSR 7 Request Send RTS 4 Request Send RTS 8 Clear Send CTS 5 Clear Send CTS 9 Ring Indicators Dell 22 Ring Indicates Dell

2, RS232C serial communication wiring method (three-wire system)

First, the serial port transmission data can be implemented as long as there is receiving data pin and sending a pin: the receiving pin of the same serial port is connected directly, and the two serial ports are connected or a serial port and multiple serial ports.

The same serial port is connected to the 9-pin serial port and 25 pin serial ports, both 2 and 3 are directly connected.

· Two different serial ports (whether two serial ports of the same computer are serial ports of different computers)

9-pin-9 pin 25 pin-25 needle 9 pin-25 pin 2 3 2 2 2 3 2 2 3 3 3 5 5 7 7 5 7

The above table is for the microcomputer standard serial port, there are many non-standard devices, such as receiving GPS data or electronic compass data, just remember a principle: receive data pin (or line) and send data pin (or line) Connectively, there should be, and the signal is connected to each other.

3, several points to pay attention to in serial debug:

Different coding mechanisms cannot be mixed, such as RS232C can't be connected directly to the RS422 interface, and various various converters specialized on the market must be connected by the converter;

Line welding is secure, otherwise no problem, but because of the problem of wiring problems;

When serial port debugging, prepare a easy-to-use debugging tool, such as serial debugging assistant, serial wizard, etc., there is a half-time effect;

It is highly recommended not to charge the serial port. At least one end is powered off, otherwise the serial port is easily damaged.

OPC Technology Forum http://www.opc-china.com OPC server, customer program technology discussion

转载请注明原文地址:https://www.9cbs.com/read-70076.html

New Post(0)