中文English
232芯片ichaiyang 2024-05-10 4:17 44
The answers from the people upstairs have been very good, just a quick supplement.UART,232,485 are serial ports, but the level is not the same, UART is generally used for internal...

How to judge the RX and TX pins of RS232?

The answers from the people upstairs have been very good, just a quick supplement.

UART,232,485 are serial ports, but the level is not the same, UART is generally used for internal communication on the circuit board or short-distance communication, the most commonly used is the MCU, STM32 and so on, there is a serial device on the board, you can directly use the UART's TX,RX pin connection, or leave a row pin or terminal block external, Note that if it is to be connected externally, it needs power supply and common ground, which is suitable for serial port modules with short distance, such as credit card, Bluetooth, WiFi small module and so on;

If the distance is large, at the level of meters, it is best to use a MAX232 chip to change one, the role of this chip is to convert the high TTL level into 232 level of -15V, the low TTL into 232 level of 15V, in the long distance transmission when the anti-interference performance is better.

At this time, the simple VCC, TX, RX, GND is no longer used, but the standard interface DB9, a trapezoidal port can be seen on various devices such as computers, which has 9 pins, that is, the DB9 interface, the use of pins is selected in the design, pay attention to the correspondence between the pins connected at both ends of the serial line, to ensure that TX is connected to RX.

232 level communication can meet the distance of meters to 10 meters, then how to do, the environment is very bad, with 485,485 is an industrial-grade communication method, strong anti-interference ability, the communication distance can reach kilometers, similar to UART 232, the use of 485 also needs to turn a, generally use MAX485 chip.

Finally, the communication distance is related to the level, but also to the baud rate, communication protocol, etc., and the actual need to solve problems in the basic design. For specific use, you also need to consult the datasheet of each chip, hoping to help you.


The standard is that pin 2 is RX and pin 3 is TX. The few more sophisticated devices I've seen are standard. But not all devices according to this standard do not know. However, the conversion cable between the two RS232 has already crossed the 2 and 3 feet, and some have not. Therefore, when two RS232 are connected, it is best to determine whether it is correct through instructions and measurements!