UART Explained(转载)

  做嵌入式开发,UART几乎是必不可少的,调试串口、GPS、GPRS、Bluetooth等模块很多都是用的UART接口。时下火热的IoT也不乏UART的身影,串口的BLE、WIFI、Zigbee、Lora等等模块,一堆一堆。前一篇提到的NUC972竟然内置了11个UART,也就可以理解了。虽然之前已基于串口做了很多工具软件,如S3C2410的烧录助手、WinCE串口调试助手、GPRS拨号助手、蓝牙模块调试助手等等,但现在搞IoT再弄串口,还是有必要整理一下这方面的知识,毕竟IoT跟教学实验设备甚至车载导航有很大不同,是不能够随便重启的。IoT产品可靠性要求极高,避免自己掉到坑里或者挖坑害了战友,花点时间整理UART相关知识是非常值得的。本篇转载的文章主要介绍了UART的基本特性,个人感觉写的非常好,具体如下。

Introduction to the standard serial bus

  UART (Universal Asynchronous Receiver/Transmitter) is one of the earliest modes of communication applied to computers, and its origins go back at least as far as the 1960s when it was used to connect minicomputers toteletypewriter machines — 'teletypes', as they were more commonly called. These were essentially electric keyboards able to transmit keystrokes to, and to print out responses from, the host. During the 1970s, UART was employed to allow early microcomputers to store and load programs and data from cassette tapes. In the following decades it was used to get personal computers talking to online services via modems.

  Until the arrival of USB, personal computers had serial ports to connect to other devices. UART was the underlying means of communication. Nowadays, UART is used primarily by microcontroller-based gadgets and by more sophisticated devices, including the imp.

  UART has had many names, but whatever it has been called, it always involves sending data over two wires — one for transmission, the other to receive incoming data. The information is transmitted one binary bit at a time; as such it is a 'serial' communications method. These bits are grouped together into 'frames' — a set format for conveying one meaningful piece of data.

  UART is said to be 'universal' because its parameters — speed, data size and so on — are not fixed and can be configured to meet the needs of a given communication requirement, though this means that both sides of the conversation need to have already agreed on these parameters. It is 'asynchronous' because it doesn't require a sender-provided clock to synchronize the transmission and receipt of data.

UART Signalling

  Because there is no clock signal per se, a 'start bit' is added sent first to tell the receiver to listen out for data. The receiver watches for a logic 'high' falling to logic 'low'. The receiver synchronizes its own bus clock to that bit.

  Following the start bit come the bits that that make up the 'word' being sent, with bit zero, the least significant bit, being sent first. The bits are sent as pulses on the wire at specific time intervals, set at both ends of the link to previously agreed values. The receiver looks at the voltage on the wire at these times; if it sees a logic high, it records a binary digit 1, or a 0 if the line is 'low', or 0V. The receiver checks half way between the start and the end of the pulse to ensure it doesn't mis-read the voltage on the line during the brief intervals while the voltage is rising or falling.

  If the two devices have agreed to use a 'parity bit' for rudimentary error-checking, that is calculated and sent next, in sync with the data that has been transmitted thus far. Finally, at least one 'stop bit' is sent by the transmitter.


A UART frame

  Word length, parity availability and type, and the number of stop bits all have to be agreed in advance.

  Because UART uses two wires — one, connecting device A's transmitter to device B's receiver, and the other, device B's transmitter to device A's receiver — the two participants can send each other data simultaneously, a mode of communications called 'full duplex'.

  原文链接: https://electricimp.com/docs/resources/uart/

  该网站有关IIC总线和SPI总线的介绍也相当不错,详见https://electricimp.com/docs/resources/index_hardware

  UART WIKI: https://en.wikipedia.org/wiki/Universal_asynchronous_receiver/transmitter

时间: 2024-10-26 09:27:14

UART Explained(转载)的相关文章

UART to Serial Terminal(转载)

前一篇<UART Explained>介绍了UART的基本信息,重点分析了UART的信号.本文摘录的文章则重点介绍了波特率(Baud Rate)相关的内容,波特率越高,传输速度越快,但实际使用时波特率是越高越好吗,多少合适?文中给出了答案,具体如下. Although the PIC32 is an elegant and powerful microcontroller, it doesn't stand so tall when compared against a PC in terms

[转载]Multicast Explained in Flash 10.1 P2P

原文:http://www.flashrealtime.com/multicast-explained-flash-101-p2p/,讲解单播.多播不可多得的好文章,转载防被"墙"掉 Multicast is one of the features of Flash Player 10.1 and it enables you to distribute NetStreams across the peer-to-peer mesh. It can be audio, video or

[转载]P2P GroupSpecifier Class Explained In Details Part 1

原文:http://www.flashrealtime.com/p2p-groupspecifier-explained-1/ 转过来防止被墙掉 If you've tried my tutorial on creating a simple chat using P2P NetGroup in Flash Player 10.1, you might have been wondering what the other parameters you can set up mean. Group

[转载]Flash P2P 文件共享基础教程

一篇很不错的讲解"利用flash player 10.1中的p2p特性实现文件共享"的文章,为防止原文被墙掉,转载于此,原始出处:http://www.flashrealtime.com/file-share-object-replication-flash-p2p/ Object Replication Object Replication is the most lowest-level P2P access available in Flash Player 10.1 (foll

嵌入式行业入门指导---知乎转载【转】

此文是本人在知乎上看的,觉得很好就分享出来了,并不是本人原创 转自:https://www.zhihu.com/question/47881392 作者:shang链接:https://www.zhihu.com/question/47881392/answer/146734937来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明出处. 嵌入式Linux+Android学习路线图作者:韦东山 本文目录1. 程序员的三大方向 1.1 专业领域 1.1.1 学术研究 1.1.2

Linux驱动开发必看详解神秘内核(完全转载)

Linux驱动开发必看详解神秘内核 完全转载-链接:http://blog.chinaunix.net/uid-21356596-id-1827434.html   IT168 技术文档]在开始步入Linux设备驱动程序的神秘世界之前,让我们从驱动程序开发人员的角度看几个内核构成要素,熟悉一些基本的内核概念.我们将学习内核定时器.同步机制以及内存分配方法.不过,我们还是得从头开始这次探索之旅.因此,本章要先浏览一下内核发出的启动信息,然后再逐个讲解一些有意思的点. 2.1 启动过程 图2-1显示

协议中UART的两种模式 【转】

转自:http://wjf88223.blog.163.com/blog/static/3516800120104179327286/ ^^-- 协议栈中UART有两种模式:1.中断2.DMA 对于这两种模式具体运用在哪一步,纠结了很久.通过UART配置结构:typedef struct{  uint8 *rxBuf;  uint8 rxHead;  uint8 rxTail;  uint8 rxMax;  uint8 rxCnt;  uint8 rxTick;  uint8 rxHigh;  

UART中的硬件流控RTS与CTS DTR DSR DTE设备和DCE设备【转】

中低端路由器上使用disp interface 查看相应串口状态信息,其中DCD.DTR.DSR.RTS及CTS等五个状态指示分别代表什么意思? DCD ( Data Carrier Detect 数据载波检测) DTR(Data Terminal Ready,数据终端准备好) DSR(Data Set Ready 数据准备好) RTS( Request To Send 请求发送) CTS(Clear To Send 清除发送) 在这五个控制信号中,DTR和RTS是DTE设备(数据终端设备,在实

八、mini2440裸机程序之UART(2)UART0与PC串口通信【转】

转自:http://blog.csdn.net/shengnan_wu/article/details/8309417 版权声明:本文为博主原创文章,未经博主允许不得转载. 1.相关原理图   2.相关寄存器介绍与配置       1)与管脚相关   ①GPHCON   注: 配置成UART0功能: GPHCON |= 10 10 10 10b(还要在GPHUP里把管脚禁止上拉)       2)与中断相关 上传图片好麻烦,跟以前相关的这里就不贴了       3)与UART0相关 ①ULCON