UART explained (reprint)

Source: Internet
Author: User

To do embedded development, UART is almost essential, debugging serial port, GPS, GPRS, Bluetooth and many other modules are used UART interface. Nowadays the hot IoT also has the UART figure, the serial port ble, WIFI, Zigbee, Lora and so on module, a bunch of piles. The NUC972 mentioned in the previous article even built up 11 UART, it can be understood. Although has been based on the serial port to do a lot of tool software, such as s3c2410 of the burning assistant, WinCE serial debugging assistant, GPRS Dial Assistant, Bluetooth module debugging assistant, and so on, but now make the IoT to get the serial port, or it is necessary to tidy up this knowledge, After all, IoT is very different from teaching lab equipment or even car navigation, and it's not easy to restart. IoT product reliability requirements are very high, to avoid falling into the pit or digging entrap comrades, spend some time to organize the relevant knowledge of the UART is very worthwhile. This article reproduced the main introduction of the basic characteristics of the UART, the personal feeling written very good, specific as follows.

Introduction to the standard serial bus

UART (Universal asynchronous Receiver/transmitter) is one of the earliest modes of COM Munication applied to computers, and its origins go back in least as far as the 1960s when it is used to connect Minicomp Uters 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 is employed to allow early microcomputers to store and load programs and data from cassette tapes. In the following decades it is 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 had had many names, but whatever it had been called, it always involves sending data over the Wires-one for Transmi Ssion, 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 is grouped together into ' frames '-a set format for conveying one meaningful piece of data.

UART is said to be ' universal ' because it parameters-speed, data size and so on-are not fixed and can be configured T O Meet the needs of a given communication requirement, though this means which both sides of the conversation need to has Already agreed on these parameters. It's ' asynchronous ' because it doesn ' t require a sender-provided clock to synchronize the transmission and receipt of DAT A.

UART signalling

  Because There is no clock signal per se, a ' start bit ' was 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, the ' word ' being sent, with bit zero, the least significant bit, b Eing sent first. The bits is sent as pulses on the wire at specific time intervals, set at both ends of the link to previously agreed Valu Es. The receiver looks at the voltage in the These times; If it sees a logic high, it records a binary digit 1, or a 0 if the line was ' low ', or 0V. The receiver checks half between the start and the end of the pulse to ensure it doesn ' t mis-read the voltage on the L ine during the brief intervals while the voltage is rising or falling.

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


A UART Frame

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

Because UART uses-wires-one, connecting device A ' s transmitter to device B's receiver, and the other, device B ' s TRA Nsmitter to device a receiver-the the participants can send each other data simultaneously a mode of communications C Alled ' Full Duplex '.

Original link: https://electricimp.com/docs/resources/uart/

The website about the IIC Bus and SPI Bus introduction is also quite good, see Https://electricimp.com/docs/resources/index_hardware

UART Wiki:https://en.wikipedia.org/wiki/universal_asynchronous_receiver/transmitter

UART explained (reprint)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.