← Writing

UART (Universal Asynchronous Receiver / Transmitter)

2025-06-30 embedded · basic · sp


A technical introduction to the UART - low-speed two-wire asynchronous multi-duplex serial protocol.
UART The earliest serial protocol. Still commonly used in modern electronics.


    UART

UART - Universal Asynchronous Receiver / Transmitter

  1. simplex - only in one direction (TX -> RX)
  2. half-duplex - at the same time, either transmission or reception of data can occur. (Tx -> RX, RX -> TX)
  3. full-duplex - both nodes transmit data simultaneously. (TX <-> RX)

    UART Frame Format

Start / Stop

The transmitter must inform the receiver that the data is ready to be transmitted.
The start bit is a transition from idle high(1) to low(0) state.
After sending the data, there is a stop bit which means that the sending is complete.
The stop bit either transitions from low(0) to high(1) state, or simply leaves the state high(1).

Data bit

Useful information comes immediately after the start bit (there can be from 5 to 9, but most often 7-8 bits)

Parity bit

Used to detect any errors in the transmitted message
located between the last data bit and the stop bit