A few days ago, I saw a discussion in the group chat regarding the “transmission distances of TTL, RS232, and RS485“. Today, I took some time to share relevant content, hoping it will be helpful to everyone.
Overview
Many people may not be very familiar with TTL, RS232, and RS485, so let me briefly summarize what they are.
1. TTL Level
TTL: Transistor-Transistor Logic, which refers to transistor-transistor logic levels.
For example, 0V represents a logic low level, while 5V represents a logic high level. The logic high level output from the STM32 microcontroller’s serial port pin is 3.3V.
You might ask: What is a logic level?
A logic level is a specific voltage or state in which a signal can exist, typically represented as “0/1”, “on/off”, “ON/OFF”, or “LOW/HIGH”.

With the rapid development of electronic technology, the voltage for logic high levels is also decreasing, for instance, the supply voltage for DDR5 memory is only 1.1V.
For more related content, you can refer to an article I shared earlier: The World of Logic Levels 0 and 1.
2. RS232
RS232, also known as 232, stands for EIA-RS-232.
● EIA: Electronic Industry Association, USA● RS: Recommended Standard, representing the recommended standard● 232: represents the identification number
RS232 has multiple versions, such as RS232A, RS232B, RS232C…F, with RS-232C being the most commonly used today.
RS232 was originally used for modems, so its pin definitions are related to modem transmission.
In the early days, 25-pin connectors (DB25) were commonly used, especially for early printers and fax machines, but they are rarely used now.
Many people may not have seen them; when I was in college, I used this DB25 interface to download programs for the MSP430.

Now, the DB9 connector is commonly used, which I believe everyone is familiar with, but most of the time we only use pins 2, 3, and 5.

| Number | Definition | Function |
|---|---|---|
| 1 | DCD | Data Carrier Detect |
| 2 | RXD | Data Receive |
| 3 | TXD | Data Transmit |
| 4 | DTR | Data Terminal Ready |
| 5 | GND | Signal Ground |
| 6 | DSR | Data Set Ready |
| 7 | RTS | Request to Send |
| 8 | CTS | Clear to Send |
| 9 | RI | Ring Indicator |
DB9 connectors are still retained on many computer back panels, and even if they are not on the back panel, the motherboard still has DB9 interfaces (I recently built a computer and specifically bought a DB9 external interface).

3. RS485
RS485 can be said to have developed based on RS232, with the aim of “increasing anti-interference capability and signal transmission distance“.
RS232 uses voltage to represent logic high and low levels, for example, ±15 volts.
In contrast, RS485 uses differential voltage, meaning the voltage difference between two signal lines (A and B) represents the logic high and low levels.
RS232 supports full-duplex communication, while RS485 is half-duplex communication.

Transmission Distance
In college, you might have been told that the transmission distance for RS232 is 15 meters. Or you may have seen in some books that the transmission distance for RS485 is 1200 meters.
The communication transmission distance is influenced by many factors, and there is a significant difference between actual and theoretical distances; in some cases, RS485 may have issues transmitting even 500 meters.
The communication transmission distance is related to various factors such as communication method, baud rate, connection cable, interference, etc. Here, I will briefly discuss these issues in relation to UART communication.
1. Communication Method
The communication methods referred to here are the different communication methods such as “TTL, RS232, and RS485” mentioned in the title.
Under normal circumstances, the communication distance is: TTL < RS232 < RS485.
TTL is usually used within the same board, for example, communication between the serial ports of chip A and chip B.
RS232 is still used in many scenarios, typically for communication between devices, usually connected via DB9 or two signal lines (in a project I participated in, I expanded 8 serial ports using a computer PCI card, which used the RS232 method).
RS485 is more commonly used in industrial products, allowing multiple devices to connect on the 485 bus, with longer transmission distances and stronger anti-interference capabilities.
2. Baud Rate
Baud rate, 1 baud refers to the transmission of 1 symbol per second. Baud (unit symbol: Bd)
You can understand it as the speed of signal transmission, for example, a serial port at 9600 bps.
The higher the baud rate, the higher the frequency, and under the same conditions, the shorter the transmission distance.
The baud rate of a serial port can be very high, such as 115200 bps, but transmitting at this baud rate over RS232 may encounter issues after 10 meters.
3. Connection Cable
The connection cable is also a key factor; the material of the cable (copper, aluminum, iron), thickness, and whether it is shielded can all affect the transmission distance of the signal.
In a clean environment (like a laboratory or office), the differences may not be noticeable, but in complex environments (like factories, especially where there are many large machinery), the differences become apparent.
Therefore, RS485 uses differential signals and twisted pairs, and better quality cables with shielding show advantages in industrial environments.
4. Interference Factors
Those who have worked on industrial products know that not only are EMC requirements high, but communication requirements are also stringent.
A large device suddenly starting nearby can easily cause communication failures (or chip resets, crashes, etc.).
Even if RS485 can transmit 1200 meters, communication may fail even at 200 meters in a factory.
In summary, to increase transmission distance while ensuring signal stability, it is usually necessary to stay as far away from interference sources (large machinery), increase shielding measures, and reduce transmission speed (baud rate).
Source: strongerHuang▍Recommended Reading: After eight months, another person from the “National Core Fund” has been investigated! Why do domestic chips also use English for “datasheet”? The boss is reluctant to scrap the server motherboard and forces me to provide an X-ray report.