做嵌入式开发,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

UART Explained(转载)的更多相关文章

  1. UART to Serial Terminal(转载)

    前一篇<UART Explained>介绍了UART的基本信息,重点分析了UART的信号.本文摘录的文章则重点介绍了波特率(Baud Rate)相关的内容,波特率越高,传输速度越快,但实际 ...

  2. Qt QStringLiteral

    zz 解释QStringLiteral 原文发表于woboq网站  QStringLiteral explained 转载 原作者: Olivier Goffart 译者:zzjin QStringL ...

  3. 【转载】IIC SPI UART串行总线

    一.SPISPI(Serial Peripheral Interface,串行外设接口)是Motorola公司提出的一种同步串行数据传输标准,在很多器件中被广泛应用. 接口SPI接口经常被称为4线串行 ...

  4. [转载]Average Manager vs. Great Manager Explained in 10 sketches

    Assigning Tasks     Delivering News     Conducting 1:1s     Giving Feedback     Dealing with Turbule ...

  5. GJM :异步Socket [转载]

    原帖地址:http://blog.csdn.net/awinye/article/details/537264 原文作者:Awinye 目录(?)[-] 转载请原作者联系 Overview of So ...

  6. Serial Port Programming on Linux(转载)

    This is a tutorial on how to program the Serial Ports on your Linux box.Serial Ports are nice little ...

  7. RS-232, RS-422, RS-485 Serial Communication General Concepts(转载)

    前面转载的几篇文章重点介绍了UART及RS-232.在工控领域除了RS-232以外,常用的串行通信还有RS-485.本文转载的文章重点介绍了RS-232.RS-422和RS-485. Overview ...

  8. 【C51】UART串口通信

    我们常需要单片机和其他模块进行通信,数据传输,常用的方式就是串口通信技术. 常用来 单片机<-->电脑,  单片机<-->单片机之间通信. 串行通信 versus 并行通信 并 ...

  9. 【转载】关于Embedded Linux启动的经典问题

    转载自:http://linux.chinaunix.net/techdoc/install/2009/04/13/1107608.shtml 发信人: armlinux (armlinux), 信区 ...

随机推荐

  1. javascript对象初探(一)--- 构造器函数

    我们可以通过构造器函数(简称构造函数)来创建对象: function Her(){ this.child = 'Jon'; } 为了使用该函数来创建对象,我们需要使用new操作符,例如: var sh ...

  2. ng-cordova 手机拍照或从相册选择图片

    1.需求描述 实现一个调用摄像头拍照,或者直接打开本地图库选择照片,然后替换App中图片的功能 2.准备 1) 安装ng-cordova 进入到ionic工程目录,使用bower工具安装, bower ...

  3. 捕获当前事件作用的对象event.target和event.srcElement

    语法: //返回事件的目标节点(触发该事件的节点). event.target //FF,Chrome event.srcElement //IE 栗子: var oDiv=document.getE ...

  4. 转 用C API 操作MySQL数据库

    用C API 操作MySQL数据库 参考MYSQL的帮助文档整理 这里归纳了C API可使用的函数,并在下一节详细介绍了它们.请参见25.2.3节,“C API函数描述”. 函数 描述 mysql_a ...

  5. 利用Dreamweaver配置PHP服务器的站点

    配置的步骤: 1.打开Dreamweaver的站点------->新建站点-------->点击保存 2.点击服务器------>保存 3.配置完成之后就可以看到在Dreamweav ...

  6. Android touch事件处理流程

    前面我们看了key事件的处理流程,相信大家对此已经有了新的认识,这篇文章我打算带领大家来看看稍微复杂些的touch 事件的处理流程.说它复杂是因为key事件本身就key down,up,long pr ...

  7. [整理]PHP/HTML混写的四种方式

    PHP作为一款后端语言,为了输出给浏览器让浏览器呈现出来,无可避免的要输出HTML代码,下文介绍下我用过的三种PHP/HTML混编方法 1.单/双引号包围法 这是最初级的方法了,用法就像下面这样 &l ...

  8. 万能面试问题大全,教你怎么回答,怎么拿下offer

    一.你对薪资的要求? 回答提示: 说实话,大家找工作,都希望找个高薪的,那我们如何和公司去谈薪酬呢?如果你对薪酬的要求太低,那显然贬低自己的能力:如果你对薪酬的要求太高,那又会显得你分量过重,公司受用 ...

  9. Hadoop生态圈以及各组成部分的简介

    1.Hadoop是什么? 适合大数据的分布式存储与计算平台 HDFS: Hadoop Distributed File System分布式文件系统 MapReduce:并行计算框架 解决的问题: HD ...

  10. PS网页设计教程——30个优秀的PS网页设计教程的中文翻译教程

    PS网页设计教程--30个优秀的PS网页设计教程的中文翻译教程   作为编码者,美工基础是偏弱的.我们可以参考一些成熟的网页PS教程,提高自身的设计能力.套用一句话,"熟读唐诗三百首,不会作 ...