当前位置:网站首页>通信总线协议一 :UART
通信总线协议一 :UART
2022-07-25 11:29:00 【~QwQ~】
通信总线协议一 :UART
1. 通信基础
1.1 并行,串行

并行传输:数据以成组的方式,在多条并行信道上同时进行传输串行传输:使用一条数据线,将数据一位一位地依次传输,每一位数据占据一个固定的时间长度
1.2 单工,双工

单工通信:只允许一方向另外一方传送信息,而另一方不能回传信息。比如电视遥控器、收音机广播等,都是单工通信技术。半双工通信:数据可以在双方之间相互传播,但是同一时刻只能其中一方发给另外一 方。比如对讲机。全双工通信:指发送数据的同时也能够接收数据,两者同步进行,比如电话。
1.3 同步,异步
异步通信: 通信双方使用各自自己的时钟,按照约定的统一的波特率,去收发数据。由于双方的时钟频率可能会存在一定的误差,异步通信一个数据帧长度较短,发送效率低。同步通信:通信双方使用频率一致的时钟,发送方要以固定的节奏去发送数据,而接收方要时刻做好接收数据的准备,识别到前导码后马上要开始接收数据了。同步数据帧长度大,效率更高,更加适合对速度要求高的传输。
1.4 波特率
波特率 : 串口通信的速率,单位为bps (bit per second),即每秒钟可以传输多少个二进制位。比如每秒钟可以传输9600个二进制,波特率就是9600。
2. Uart通信协议

空闲位:当数据线无数据传输时,数据线保持高电平,即空闲位为1起始位:开始传输数据时,数据线从1变成0,传输起始位0数据位:一次可传输5~8位,通常都是一次传输8位,即一个byte。先发低位,后发高位,例如传输0x55,对应二进制0 1 0 1 0 1 0 1,先发送低位(最右边)的1检验位:占用一个bit,采用奇偶检验法,校验位可有可无停止位:表示一帧数据传输完成,停止位占用1~2bit- uart一次只能传输一个字符, 如果需要传输多个字符,则每个字符都按照上述的帧格式,进行传输
- 通信的双方,必须设置成一样的波特率,才能正确的进行通信
3. 硬件连接

- uart的硬件连接很简单,如上图所示:一方的发送Tx连接另一方的接收Rx,地线GND连接即可。
感谢阅读 若有错误 敬请见谅 !!!
边栏推荐
- aaaaaaaaaaA heH heH nuN
- 【GCN-RS】MCL: Mixed-Centric Loss for Collaborative Filtering (WWW‘22)
- Transformer variants (routing transformer, linformer, big bird)
- Learning to pre train graph neural networks
- Meta learning (meta learning and small sample learning)
- 那些离开网易的年轻人
- 通过Referer请求头实现防盗链
- selenium使用———安装、测试
- 微信公众号开发 入手
- 嵌套事务 UnexpectedRollbackException 分析与事务传播策略
猜你喜欢

Word中的空白页,怎么也删不掉?如何操作?

Zuul网关使用
![[GCN multimodal RS] pre training representations of multi modal multi query e-commerce search KDD 2022](/img/9c/0434d40fa540078309249d415b3659.png)
[GCN multimodal RS] pre training representations of multi modal multi query e-commerce search KDD 2022

【AI4Code】《Pythia: AI-assisted Code Completion System》(KDD 2019)

Learning to pre train graph neural networks

对比学习的应用(LCGNN,VideoMoCo,GraphCL,XMC-GAN)

Solutions to the failure of winddowns planning task execution bat to execute PHP files

【6篇文章串讲ScalableGNN】围绕WWW 2022 best paper《PaSca》

【AI4Code】《Unified Pre-training for Program Understanding and Generation》 NAACL 2021
![[comparative learning] understanding the behavior of contractual loss (CVPR '21)](/img/96/9b58936365af0ca61aa7a8e97089fe.png)
[comparative learning] understanding the behavior of contractual loss (CVPR '21)
随机推荐
【多模态】《TransRec: Learning Transferable Recommendation from Mixture-of-Modality Feedback》 Arxiv‘22
R语言使用ggpubr包的ggarrange函数将多幅图像组合起来、使用ggexport函数将可视化图像保存为jpeg格式(width参数指定宽度、height参数指定高度、res参数指定分辨率)
The JSP specification requires that an attribute name is preceded by whitespace
After having a meal with trump, I wrote this article
JS interview question: handwriting throttle function
【6篇文章串讲ScalableGNN】围绕WWW 2022 best paper《PaSca》
Solved files' name is invalid or doors not exist (1205)
【云驻共创】AI在数学界有哪些作用?未来对数学界会有哪些颠覆性影响?
Application of comparative learning (lcgnn, videomoco, graphcl, XMC GaN)
PHP uploads the FTP path file to the curl Base64 image on the Internet server
[comparative learning] understanding the behavior of contractual loss (CVPR '21)
从云原生到智能化,深度解读行业首个「视频直播技术最佳实践图谱」
【GCN】《Adaptive Propagation Graph Convolutional Network》(TNNLS 2020)
【GCN-RS】Towards Representation Alignment and Uniformity in Collaborative Filtering (KDD‘22)
【AI4Code】《CodeBERT: A Pre-Trained Model for Programming and Natural Languages》 EMNLP 2020
Atomic atomic class
flink sql client 连接mysql报错异常,如何解决?
[high concurrency] a lock faster than read-write lock in high concurrency scenarios. I'm completely convinced after reading it!! (recommended Collection)
selenium使用———xpath和模拟输入和模拟点击协作
【AI4Code】《IntelliCode Compose: Code Generation using Transformer》 ESEC/FSE 2020