Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What's the difference between serial port, COM port, UART port, TTL, RS-232 and RS-485?

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Serial port, COM port, UART port, TTL, RS-232, RS-485 what is the difference, I believe that many inexperienced people are helpless about this, this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.

Debugging will always encounter a variety of interfaces, a variety of conversion board, seems to understand the feeling of non-understanding very uncomfortable!

First, serial port, UART port, COM port, USB port refers to the physical interface form (hardware). TTL, RS-232, RS-485 refer to the level standard (electrical signal).

Serial port: Serial port is a generic term, UART, TTL, RS232, RS485 all follow similar communication timing protocols, so they are commonly referred to as serial ports.

UART interface: Universal Asynchronous Receiver/Transmitter, UART is the logic circuit of serial transceiver, this part can be independent into chips, can also be embedded as a module into other chips, MCU, SOC, PC will have UART module.

COM port: refers to the serial communication port of D-SUB shape (a connector structure, VGA interface connector is also D-SUB) on desktop computer or some electronic equipment, and applies serial communication timing and RS232 logic level.

USB port: Universal serial bus, and serial port are completely two concepts. Although it is also serial communication, because USB communication timing and signal level are completely different from serial port, it has nothing to do with serial port. USB is a high-speed communication interface for PC to connect various peripherals, USB flash drive, mouse and keyboard, mobile hard disk, and of course,"USB to serial port" module. (USB Serial port module, that is, UART module of USB interface)

TTL, RS232, RS485 are all logic level representations.

TTL: TTL refers to bipolar transistor logic circuit, many "USB to TTL" modules on the market, in fact,"USB to TTL level serial port" module. This signal 0 corresponds to 0V, 1 corresponds to 3.3 V or 5 V. Compatible with MCU and SOC IO level. However, the actual TTL level is not necessarily, because most of the digital logic is now made in CMOS technology, just following the TTL statement. When we carry out serial communication, the basic ones that come out directly from the microcontroller are TTL levels.

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' mean

RS232: is an asynchronous transmission standard interface formulated by the Electronic Industries Association (EIA), and corresponds to the level standard and communication protocol (timing). Its level standard: +3V~+15V corresponds to 0,-3V~-15V corresponds to 1. RS232 logic levels are 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' mean

RS485: RS485 is a serial interface standard, for long-distance transmission using differential transmission, transmission is differential signal, anti-interference ability is much stronger than RS232. The voltage difference between two lines is-(2~6)V, which means 0, and the voltage difference between 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 AB two lines.

1. The hardware block diagram is as follows

2.'0' and '1' mean

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

Usually we see two physical standards. D type 9 pin plug, and 4 pin Dupont head two.

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

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

Embedded serial port, generally refers to UART port, but we often do not know the difference between it and COM port, and RS232, TTL and other relations, in fact UART,COM refers to the physical interface form (hardware), and TTL, RS-232 refers to the level standard (electrical signal).

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

The following is the D-type 9-pin serial port (popular saying). You can see it behind your desktop computer. Remember, there are only two protocols for this interface: RS-232 and RS-485. It will not be TTL level (except for special applications). For the definition of 9-pin serial port, please refer to here: wenku.baidu.com/view/5c170c6925c52cc58bd6be6e.html

We usually only connect RXD TXD two pins, plus GND.

The following figure is a USB to TTL serial port small board, you can use USB to expand a serial port. The chip is PL2303HX. Online often confused with a variety of serial ports, but this is indeed possible to STC MCU download procedures.

This is another, CP2102 chip, is also USB to TTL serial port. It is said that it is better than PL2303, but it is not felt in actual use. This small board has an additional +3.3V supply terminal to accommodate different target circuits. The following figure shows USB to RS-232 serial port:

After reading the above content, do you have any way to master the difference between serial port, COM port, UART port, TTL, RS-232, RS-485? If you still want to learn more skills or want to know more related content, welcome to pay attention to the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report