Detailed Explanation of Serial Ports, COM Ports, TTL, RS-232, and RS-485 Differences

Point:

1. The serial port and COM port refer to physical interface types (hardware). TTL, RS-232, and RS-485 refer to signal level standards (electrical signals).

2. When connecting devices, generally only GND, RX, and TX are connected. The Vcc or +3.3V power line is usually not connected to avoid conflicts with the power supply of the target device.

3. The PL2303 and CP2102 chips are USB to TTL serial chips that use USB to extend the serial port (TTL level).

4. The MAX232 chip is a dedicated bidirectional conversion chip between TTL levels and RS-232 levels, capable of converting TTL to RS-232 and vice versa.

5. The TTL standard has a low level of 0 and a high level of 1 (+5V level). The RS-232 standard has a positive level of 0 and a negative level of 1 (±15V level).

6. RS-485 is similar to RS-232 but uses differential signals and negative logic. This will be skipped here.

Serial Port, COM Port:

The COM port, short for serial communication port, is commonly referred to as a serial port. This is distinct from USB’s “Universal Serial Bus” and the hard disk’s “SATA”.

Generally, we see two physical standards: the D-type 9-pin connector and the 4-pin Dupont connector.

This is a common 4-pin serial port, often found on circuit boards, usually with Dupont pins on top. Sometimes there is a fifth pin for the 3.3V power supply.

Since it is reserved on the circuit board, there can be many protocols, depending on the specific device.

  

Detailed Explanation of Serial Ports, COM Ports, TTL, RS-232, and RS-485 Differences

The following is a D-type 9-pin serial port (commonly referred to). It can be seen at the back of desktop computers.

Remember, this type of interface has only two protocols: RS-232 and RS-485. It will not be TTL level (unless for special applications).

We generally only connect RXD and TXD, plus GND.

  

Detailed Explanation of Serial Ports, COM Ports, TTL, RS-232, and RS-485 Differences

The image below shows a USB to TTL serial board, which can extend a serial port using USB. The chip is PL2303HX.

There is often confusion online regarding various serial ports, but this one can indeed be used to download programs to STC microcontrollers.

  

Detailed Explanation of Serial Ports, COM Ports, TTL, RS-232, and RS-485 Differences

This is another one, using the CP2102 chip, also a USB to TTL serial port. It is said to be better than PL2303, but I haven’t noticed a difference in actual use. This board also includes a +3.3V power supply terminal to accommodate different target circuits.

  

Detailed Explanation of Serial Ports, COM Ports, TTL, RS-232, and RS-485 Differences

The above introductions are all about USB to TTL serial ports. What if the target device has an RS-232 serial port (D-type 9-pin connector)?

Just connect a MAX232 chip to convert it.

You can also build a simple comparator circuit to achieve TTL to RS-232 functionality, as shown in the figure below.

  

Detailed Explanation of Serial Ports, COM Ports, TTL, RS-232, and RS-485 Differences

How to convert RS-232 to TTL? This requires a bit of thought. Of course, someone has already thought of creating a finished product. Looking closely at the figure below, USB is converted to TTL serial through PL2303, and the four holes in the middle can be connected out, and then converted to RS-232 levels through MAX232, leading to the 9-pin serial port.

  

Detailed Explanation of Serial Ports, COM Ports, TTL, RS-232, and RS-485 Differences

Below is another version: the level conversion still uses MAX232.

  

Detailed Explanation of Serial Ports, COM Ports, TTL, RS-232, and RS-485 Differences

You might buy something like this: it looks like there’s only one cow dung chip inside.

But remember one thing, as long as it’s a D-type 9-pin serial port, it will not be TTL level; unless specified otherwise, it is assumed to be RS-232.

Therefore, this cable, regardless of its internal structure, is a USB to RS-232 serial cable.

What I want to emphasize is that the serial port of a device can be determined as TTL or RS-232 based on the output serial cable, which in turn decides the connection method and whether a conversion circuit is needed.

Leave a Comment