当前位置:网站首页>UART bus protocol
UART bus protocol
2022-07-20 19:40:00 【Fang XS.】
UART bus protocol
- Fang XS.
- [email protected]
- Record learning , Easy to review .
- If there is an error , Hope to be pointed out , The road of learning technology will inevitably be bumpy .
brief introduction
- UART It's a double line , full duplex , Serial bus protocol .
- UART General asynchronous transceiver (Universal Asynchronous Receiver/Transmitter).
- For short distances , Point to point communication .
- Hardware :
- RXD For receiving signals .
- TXD Used to send signals .
- When two devices use serial port communication ,A The equipment RXD Connect to B The equipment TXD,B The equipment RXD Connect to A The equipment TXD, Cross connect .
- Baud rate :
- Baud rate is a measure UART Important standard of communication speed , Company (bit/s).
- because UART There is no clock synchronization line , So the two devices use their own clock lines .
- Only with a unified baud rate can communication be correct .
- If you send a lot of data in succession , Suppose the second data starts to be wrong , The following data will be wrong , So in order to prevent cumulative error ,UART Data is sent frame by frame .
- MCU Peripherals usually come with UART Hardware peripherals , Therefore, the actual use only needs to configure registers , Write send and receive functions .
- Communication between two devices , Baud rate must be configured the same , In practice , Garbled code is basically inconsistent with baud rate .
The frame format
- UART A communication frame has a start bit , Data bits , Parity bit , Stop bit .
- UART The idle bit is high .
- Start bit :
- Used to start the bus .
- To send data, pull the signal down by one clock cycle .
- Data bits :
- The data bits are configurable 5-8 position .
- Data bits send data from low to high .
- Parity bit :
- Odd check : In data bits
1
For the even , Check bit is1
( Keep it odd ). - Even check : In data bits
1
For the even , Check bit is0
( Keep it even ). - No verification : There can be no check digit .
- Odd check : In data bits
- Stop bit :
- To end sending data, pull up the signal by one clock cycle , Indicates the end of data communication in this frame .
- Frame format diagram :
边栏推荐
猜你喜欢
Keil 和SI编译器的代码不对齐??
微信小程序开发使用onreachBottom实现页面触底加载及分页
MySQL common statement knowledge points
Wechat applet development uses onreachbottom to realize page bottom loading and paging
ICASSP 2022 Women Session Only in Shenzhen
DOM 事件类型
[arrays and common operations of arrays]
code spell checker插件规避掉一些特定词汇报错“xxx“: Unknown word.cSpell
RES-BSANP白藜芦醇白蛋白纳米粒/包裹紫杉烷类的白蛋白纳米颗粒载体
【C语言】文件的处理与操作
随机推荐
>/dev/null 2>&1 &
广发证券网上开户?安全吗?
STM32F103 learning notes (VI) independent watchdog and window watchdog
SSH non secret login
开发者必读:2022年移动应用运营增长洞察白皮书
DTX GA BSA NPs loaded docetaxel and gambogic acid albumin nanoparticles / thioguanine albumin nanoparticles
七月集训(第19天) —— 二叉树
Interlocked原子访问系列函数
[cloud co creation] design Huawei cloud storage architecture with the youngest cloud service hcie (Part 2)
【C语言】程序环境和预处理
GL-HSANPs 甘草酸偶联人血清白蛋白包载白藜芦醇/大黄酸磷脂复合物血清蛋白纳米粒的制备
Magichub重口音对话语音识别挑战赛报名开始
koa2学习
Magic data is listed in the top 100 digital economy of Internet Weekly 2022
/bin/bash^M: 坏的解释器: 没有那个文件或目录
window常用API
What do nohup and xargs mean
KeilC51使用详解 (三)
Synchronization scripts between XSync servers
【云驻共创】与最年轻的云服务HCIE一起设计华为云存储架构(下篇)