Elio Saade
Note

UART

Topics: Embedded Systems

Universal Asynchronous Receiver-Transmitter (UART) is an asynchronous, serial, hardware communication protocol that uses two wires to send data between devices without a clock. Unlike SPI or I2C, it is a physical circuit in a microcontroller or a stand-alone IC. Since there is no clock signal, both UART devices must agree on a preset speed called baud rate, most commonly 115200115200 bits per seconds, or 96009600.

Here is a summary of the characteristics of UART:
UART_Summary.png

Interface

Each UART device has 2 pins:

  • Transmitter Tx
  • Receiver Rx

UART_Interface.png

The data is transmitted serially on the wires, i.e. bit by bit.

Data Transmission

UART uses data packets of the following form for transmission:

UART_Packet.png

  • start bit: the data line is normally held high; so to start data transfer, the UART devices pulls the line low for the duration of 1 bit
  • data frame: the actual data being transferred. It is 55 to 88 bits if a parity bit is used, or 55 to 99 bits if it's not.
  • parity bit: bit that denotes the evenness of the packet, used for error detection
  • stop bits: drive the line high for 11 to 22 bit durations to signal the end of the packet

Advantages

  • simplicity; if the application does not need a more sophisticated topology
  • low wire count
  • error checking with parity bit

Disadvantages

  • limited to point-to-point communication between 2 devices
  • no clock synchronization, which could lead to data corruption if the baud rates of the devices drift
  • slower speeds than synchronous protocols like SPI
  • Limited data frame

References

  1. https://www.analog.com/en/resources/analog-dialogue/articles/uart-a-hardware-communication-protocol.html
  2. https://www.circuitbasics.com/basics-uart-communication/

Connections

Direct relationships to this note.