Yiwen teaches you how to DIY serial cable

DIY serial cable

Are you still worried about not finding a suitable serial cable? SCM and computer serial port are not compatible, SCM and SCM serial port are not compatible, this article tells you how to make your own serial cable.
Basic knowledge points of
serial cable : The serial cable is divided into: crossover cable and straight-through cable. The cross line is a female at both ends, and a straight line is a male and a female. The serial port on the PC side is generally male. When designing the board, it’s best to be consistent with the interface standard on the PC side (the PC side is male, and the board is also male. In this case, the communication between the board and the PC, and the board and the board are all crossed lines, otherwise the board Use a straight-through cable with the PC, and a crossover cable between the board and the board).
The 232 serial line is 3 lines (TX, RX, GND), and the 485 serial line is 2 lines (A, B);
how to make a serial line:
our commonly used serial line is all DB9, which is nine-pin, but it must be realized The basic full-duplex asynchronous communication actually applies only three wires. They are TX (transmit), RX (receive), and GND (ground).
As shown in the figure, there are two connection methods of serial cable, which are straight-through cable and cross-over cable. We only need three DuPont cables to achieve this.
In DIY serial line

Straight-through wire connection method: 2 pin (RX) is connected to pin 2, pin 3 (TX) is connected to pin 3, pin 5 (ground wire) is connected to pin 5;
cross wire connection method: pin 2 (RX) and pin 3 ( TX) is connected, pin 3 (TX) is connected to pin 2 (RX), pin 5 (ground wire) is connected to pin 5; in
this way, the serial port line is made, and the communication between the board and the board and the PC can be realized.

Guess you like

Origin blog.csdn.net/abc101619/article/details/109291213