当前位置:网站首页>串口、COM、UART、TTL、RS232(485)区别详解
串口、COM、UART、TTL、RS232(485)区别详解
2022-06-23 12:57:00 【小小怪༻】
引言
调试测试时,往往会遇到各式各样的接口、转接板,感觉对它们似懂非懂,知其形而不解其意;这里主要是对串口、COM口、UART口、TTL、RS-232、RS-485作详细说明。
串口、UART口、COM口、USB口是指的物理接口形式(硬件);TTL、RS232、RS485是指的电平标准(电信号)。
串口
串口的通信方式有两种:串行通信和并行通信。
- 串行通信:数据的每一位,在相同的一根数据线上,按照顺序逐位传输;
- 并行通信:数据的每一位同时在多根数据线上传输。
串口是一个泛称,UART、TTL、RS232、RS485都遵循类似的通信时序协议,因此都被称为串口。
UART
- UART(Universal Asynchronous Receiver/Transmitter),即通用异步收发器,UART是串口收发的逻辑电路。可以独立作为芯片,也可以作为模块嵌入到其他芯片中;单片机、SOC、PC都有UART模块;
- 发送端的UART将来自控制设备(如CPU)的并行数据转换为串行数据,以串行方式将其发送到接收端的UART,然后由接收端的UART将串行数据转换为并行数据以用于接收设备的正常处理。
COM
COM口,(cluster communication port);COM口,即串行通信接口,简称串口。PC机上的COM口,一般为DB9的九针接口,最大速率115200bps。
波特率115200bps,即每秒传输115200bit数据,由于每一帧数据包含了起始位最少1bit,停止位最少1bit,校验位最少0bit,所以串口传输1字节数据,至少耗费10bit,所以实际每秒传输字节数为11520Byte,在现实使用过程中,又往往达不到这个值。
USB
USB(Universal Serial Bus);即通用串行总线;是一个外部总线标准。其通信时序和信号电平都和串口完全不同,因此和串口没有任何关系。USB是高速的通信接口,其通信主要靠D+,D-两条数据线构成的差分线来进行数据传输。USB有二种传输速率,第一种是全速模式,第二种则是低速模式;USB并且可以支持热插拔,并且USB2.0传输速度可达60MB/S,USB3.0的传输速度可达5Gb/s,USB3.1传输速度可达10Gb/s,但是实际使用时,达不到这么高的速度。
UART与USB同样是异步传输模式,同样是四根线,为啥USB比UART的速度会快那么多呢?
- UART是三根线,Tx、Tx、GND,不是四根线(相关联络信号线除外)。
- USB是D+、D-,用的是差分线,这样的话可以支持的速率更高(因为抗干扰性强),usb3.0标准可以达到5Gbps(理论上)。
- UART标准比USB早很多,当时的技术只能支持低速传输。
TTL
TTL指双极型三极管逻辑电路,市面上很多“USB转TTL”模块,实际上是“USB转TTL电平的串口”模块。这种信号0对应0V,1对应3.3V或者5V。与单片机、SOC的IO电平兼容。不过实际也不一定是TTL电平,因为现在大部分数字逻辑都是CMOS工艺做的,只是沿用了TTL的说法。我们进行串口通信的时候从单片机直接出来的基本是都是 TTL 电平。
TTL电平:全双工(逻辑1: 2.4V–5V 逻辑0: 0V–0.5V)
硬件框图如下,TTL用于两个MCU间通信
0’和‘1’表示
RS232
RS232是电子工业协会(Electronic Industries Association,EIA) 制定的异步传输标准接口,同时对应着电平标准和通信协议(时序),其电平标准:+3V~+15V对应0,-3V~-15V对应1。rs232 的逻辑电平和TTL 不一样但是协议一样。
RS-232电平:全双工(逻辑1:-15V–5V 逻辑0:+3V–+15V)
硬件框图如下,TTL用于MCU与PC机之间通信
‘0’和‘1’表示
RS485
RS485是一种串口接口标准,为了长距离传输采用差分方式传输,传输的是差分信号,抗干扰能力比RS232强很多。
RS-485:半双工、(逻辑1:+2V–+6V 逻辑0: -6V—2V)这里的电平指AB 两线间的电压差。
硬件框图如下
‘0’和‘1’表示
常见接口硬件图
COM口即串行通讯端口,简称串口。这里区别于USB的“通用串行总线”和硬盘的“SATA”。一般我们见到的是两种物理标准。D型9针插头,和 4针杜邦头两种。这是常见的4针串口,在电路板上常见,经常上边还带有杜邦插针。还有时候有第五根针,3.3V电源端。由于是预留在电路板上的,协议可以有很多种,要看具体设备。
UART有4个pin(VCC, GND, RX, TX), 用的TTL电平, 低电平为0(0V),高电平为1(3.3V或以上)。
D型9针串口(通俗说法)。在台式电脑后边都可以看到。这种接口的协议只有两种:RS-232和RS-485。不会是TTL电平的(除非特殊应用)。
USB转TTL串口的小板,可以用USB扩展出一个串口。
USB转RS-232串口
参考资料
边栏推荐
- R language dplyr package mutate_ The all function multiplies all numeric columns (variables) in the dataframe by a fixed value to generate a new data column, and specifies a user-defined suffix name f
- Germancreditdata of dataset: a detailed introduction to the introduction, download and use of germancreditdata dataset
- Tt-slam: dense monocular slam for flat environment (IEEE 2021)
- How to enable the SMS function of alicloud for crmeb knowledge payment
- What is the reason why maxcompute is sometimes particularly slow to execute SQL queries
- Photon network framework
- 20 years' Shanghai station D question Walker (two points, concise)
- "Four highs" of data midrange stability | startdt Tech Lab 18
- How did Tencent's technology bulls complete the overall cloud launch?
- Oracle中dbms_output.put_line怎么使用
猜你喜欢
![[Yunzhou said live room] - digital security special session will be officially launched tomorrow afternoon](/img/56/a6a9fbba0a9fc212883b469bb857c5.png)
[Yunzhou said live room] - digital security special session will be officially launched tomorrow afternoon
[email protected] Hdmi2.0 optical transceiver HDMI HD video optical transceiver"/>4k-hdmi optical transceiver 1 channel [email protected] Hdmi2.0 optical transceiver HDMI HD video optical transceiver
![[website architecture] the unique skill of 10-year database design, practical design steps and specifications](/img/f2/061fa6dd42e57a121401e4f0cf1865.png)
[website architecture] the unique skill of 10-year database design, practical design steps and specifications

Configure SSH Remote Login for H3C switch

技术分享| WVP+ZLMediaKit实现摄像头GB28181推流播放

快速了解常用的非对称加密算法,再也不用担心面试官的刨根问底

Online text filter less than specified length tool

Homekit and NFC support: smart Ting smart door lock SL1 only costs 149 yuan
React query tutorial ④ - cache status and debugging tools

What are the conditions for a mature knowledge management?
随机推荐
快速了解常用的非对称加密算法,再也不用担心面试官的刨根问底
How to solve the task cache compilation problem caused by gradle build cache
How to use androd gradle module dependency replacement
能把SAP系统玩成鸡肋的公司,太有才了!
POW consensus mechanism
Quarkus+saas multi tenant dynamic data source switching is simple and perfect
. Net how to use log framework NLog
Esp32-c3 introductory tutorial problems ⑧ - blufi_ example. c:244: undefined reference to `esp_ ble_ gap_ start_ advertising
同花顺网上开户安全吗,需要注意什么
Hanyuan high tech USB3.0 optical transceiver USB industrial touch screen optical transceiver USB3.0 optical fiber extender USB3.0 optical fiber transmitter
Online text filter less than specified length tool
How to enable the SMS function of alicloud for crmeb knowledge payment
Loss, duplication and backlog of message queues
华三交换机配置SSH远程登录
R language uses the polR function of mass package to build an ordered multi classification logistic regression model, and uses the summary function to obtain the summary statistical information of the
How did Tencent's technology bulls complete the overall cloud launch?
The GLM function of R language uses frequency data to build a binary logistic regression model. The input data for analysis is frequency data, which is transformed into normal sample data (split and s
Dataset之GermanCreditData:GermanCreditData数据集的简介、下载、使用方法之详细攻略
After the uncommitted transactions in the redo log buffer of MySQL InnoDB are persisted to the redo log, what happens if the transaction rollback occurs?
2022软科大学专业排名出炉!西电AI专业排名超清北,南大蝉联全国第一 !