UART Frame Format

The anatomy of a single UART packet: Start, Data, Parity, and Stop.

Packet Structure

The idle state of the UART line is HIGH (1). A transaction begins when the line is pulled LOW.

Bit Definitions

  • Start Bit (Always 0): Signals the receiver that a byte is coming. Synchronizes the internal clock counter.
  • Data Bits (5-9 bits): Usually 8 bits (1 byte). LSB sent first.
  • Parity Bit (Optional): Used for error checking. Can be Even, Odd, or None.
  • Stop Bit (Always 1): Guarantees a transition period before the next Start bit. Can be 1, 1.5, or 2 bits long.

Notation (e.g., 9600 8-N-1)

What does "8-N-1" mean?

This is the standard shorthand for UART settings:

  • 9600: The Baud Rate.
  • 8: Data bits per frame.
  • N: Parity (N = None, E = Even, O = Odd).
  • 1: Stop bits (1 or 2).

Common Errors

Framing Error

Occurs if the line is not HIGH when the Receiver expects the Stop Bit. This usually happens if the Baud Rates are slightly mismatched or if noise corrupted the start bit.

Parity Error

Occurs if the calculated parity of the received data does not match the Parity Bit sent.