News

What is serial port, COM port, UART port, TTL, RS-232, RS-485 of drone?

When we integrate drones, we will encounter various interfaces and conversion boards, so what are serial ports, COM ports, UART ports, TTL, RS-232, RS-485? the engineer of FlyDragon UAV company will give you the following detailed answers

First of all, the serial port, UART port, COM port, and USB port refer to the hardware interface form, while TTL, RS-232, and RS-485 refer to the level signal.

Serial port: serial port is a general term, UART, TTL, RS232, RS485 all follow similar communication timing protocols, so they are all called serial ports.

UART interface: Universal Asynchronous Receiver/Transmitter (Universal Asynchronous Receiver/Transmitter), UART is a logic circuit for serial port transmission and reception. This part can be formed into a chip independently or embedded in other chips as a module. There will be UART modules in single-chip microcomputers, SOCs, and PCs. .
COM port: specifically refers to the serial communication port of the D-SUB shape (a connector structure, the connector of the VGA interface is also a D-SUB) on the desktop computer or some electronic equipment, which applies the serial communication sequence and the logic circuit of RS232 flat.
USB port: Universal Serial Bus, and serial port are completely two concepts. Although it is also serial communication, because the communication timing and signal level of USB are completely different from the serial port, it has nothing to do with the serial port. USB is a high-speed communication interface, which is used for PC to connect various peripherals, U disk, keyboard and mouse, mobile hard disk, and of course the "USB to serial port" module. (USB to serial port module is the UART module of USB interface)

TTL, RS232, RS485 logic level


TTL: TTL refers to bipolar triode logic circuit. Many "USB to TTL" modules on the market are actually "USB to TTL level serial port" modules. This signal 0 corresponds to 0V, and 1 corresponds to 3.3V or 5V. Compatible with the IO level of single-chip microcomputer and SOC. However, it is not necessarily TTL level in reality, because most of the digital logic is now made of CMOS technology, but the term TTL is used. When we communicate through the serial port, the output directly from the microcontroller is basically TTL level.

TTL level: full duplex (logic 1: 2.4V--5V logic 0: 0V--0.5V)

1. The hardware block diagram is as follows, TTL is used for communication between two MCUs


2. '0' and '1' represent



RS232: It is an asynchronous transmission standard interface formulated by the Electronic Industries Association (EIA). It also corresponds to the level standard and communication protocol (timing). The level standard: +3V~+15V corresponds to 0, -3V~- 15V corresponds to 1. The logic level of rs232 is different from TTL but the protocol is the same.

RS-232 level: full duplex (logic 1: -15V--5V logic 0: +3V--+15V)


1. The hardware block diagram is as follows, TTL is used for communication between MCU and PC


2. '0' and '1' represent

RS485: RS485 is a serial port interface standard. It uses differential transmission for long-distance transmission. It transmits differential signals, and its anti-interference ability is much stronger than RS232. The voltage difference between the two lines is -(2~6)V, which means 0, and the voltage difference between the two lines is +(2~6)V, which means 1

RS-485: half-duplex, (logic 1: +2V--+6V logic 0: -6V--2V) The level here refers to the voltage difference between the two lines AB.

1. The hardware block diagram is as follows



2. '0' and '1' represent

The COM port is the serial communication port, referred to as the serial port. This is different from the "Universal Serial Bus" of USB and the "SATA" of hard disk.

Generally we see two physical standards. D-type 9-pin plug, and 4-pin DuPont head.

This is a common 4-pin serial port, common on circuit boards, often with DuPont pins on it. Sometimes there is a fifth pin, the 3.3V power supply terminal.

Because it is reserved on the circuit board, there can be many kinds of protocols, depending on the specific equipment.

The serial port mentioned in embedded generally refers to the UART port, but we often don’t know the difference between it and the COM port, and the relationship between RS232 and TTL. In fact, UART and COM refer to the physical interface form (hardware), while TTL, RS-232 refers to the level standard (electrical signal).

UART has 4 pins (VCC, GND, RX, TX), using TTL level, low level is 0 (0V), high level is 1 (3.3V or above).

The following is the D-type 9-pin serial port (in layman's terms). It can be seen on the back of the desktop computer.

Remember, there are only two protocols for this interface: RS-232 and RS-485. Will not be TTL level (unless special application).

We generally only connect two pins of RXD and TXD, plus GND.



The picture below is a small board that converts USB to TTL serial port, and a serial port can be extended by USB. The chip is PL2303HX.

Various serial ports are often confused on the Internet, but this one can indeed download programs for STC microcontrollers.

This is another, CP2102 chip, which is also a USB to TTL serial port. It is said that it is better than PL2303, but I don't feel it in actual use. This small board has an extra +3.3V power supply terminal to adapt to different target circuits.

The figure below shows the USB to RS-232 serial port: