A UART protocol is a communications protocol, which is expanded as Universal Asynchronous Receiver/Transmitter. UARTs exist to transmit and receive serial data.  A UART is a stand-alone IC or a physical circuit within a microcontroller.

UART makes use of 2 wires to transmit and receive data between devices. In the UART Protocol, two UARTs transmit and receive data from each other.

The UART transmitter converts the parallel data from a CPU into a serial form and sends it to the UART receiver. The receiver UART in turn converts the serial data back into the form of a parallel data that can be accessed by the receiving device.

  How does the UART Protocol work?

The UART communication is asynchronous by nature. This means data is transmitted asynchronously, from the Tx pin of the UART transmitter to the Rx pin of the UART receiver. There is no clock signal used to synchronize the output. Instead, the UART transmitter makes use of start and stop bits along with the data packets.  These bits signify the start and the end of the data packet. Using this information, the UART receiver knows when to start reading the bits and when to stop.

The UART receiver reads the incoming bits using a special frequency called as the baud rate once it detects the start bit. Baud rate, which is defined in bits per second or bps, is an estimation of the speed of the data transfer.

The receiving and transmitting UARTs should function at the same baud rate. Even if the baud rate between the UART transmitter and UART receiver was to differ, it shouldn’t vary by more than 10 percent, at the most.

A Typical UART Transmission Works Like This…

Step #1: The data is received in parallel from the data bus by the UART transmitter.

Step #2:  The UART transmitter then adds a start bit, stop bit and parity bit to the data frame.

Step #3: The data packet is sent by the UART transmitter to the UART receiver at a pre-decided baud rate.

Step #4: The UART receiver removes the start bit, stop bit and parity bit from the data frame received by it.

Step #5: The UART receiver than reconverts the serial data into the form of parallel data and sends it through to the data bus on the receiver.

Benefits of the UART Protocol

This communication protocol has the following advantages.

#1: It makes use of only two wires.

#2: It does not require the use of a clock signal.

#3: It makes use of a parity bit in order to permit error checking.

#4: It allows for the structure of the data packet to be changed if needed, in case both the receiver and transmitter are set up for it.

#5: A lot of research has gone into this communication protocol. It is quite popular and used for a number of purposes in the industry.

 Where the UART Protocol Lags Behind

There are some basic technological disadvantages to this protocol.

#1: The size of the data frame that can be used with this protocol cannot be more than 9 bits. Anything more than that, is immediately discarded.

#2: The baud rates should be within 10 percent of each UART.

#3: It does not allow for a multiple master or slave system.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.