Home / Learn Embedded C / UART Framing: Start, Stop and Parity Bits

UART Framing: Start, Stop and Parity Bits

The extra bits surrounding each data byte that let the receiver stay synchronized.

The gistThe extra bits surrounding each data byte that let the receiver stay synchronized.

The idea, explained simply

A typical UART frame (8N1)start4data bit 03...2data bit 71stop0
A typical UART frame (8N1)

What it is

Each UART byte is "framed" with a start bit (signals the beginning of a byte) and one or more stop bits (signals the end), with an optional parity bit for basic error detection — together these let an asynchronous receiver resynchronize for every single byte.

Why it matters

Without framing bits, a receiver with no shared clock would have no reliable way to know exactly when a new byte begins — the start bit gives it a precise reference point to begin sampling from.

Mechanically speaking

A common configuration is written as "8N1": 8 data bits, No parity, 1 stop bit — both ends must agree on this exact framing configuration, in addition to matching baud rate, or bytes will be misread.

Shows up in

  • UART configuration matching
  • Protocol framing design
  • Debugging garbled serial data

Try it

Checking that both ends agree on an 8N1 frame configurationC: edit and run

A mismatch in any one of these 3 settings, even with the correct baud rate, produces exactly the garbled data this lesson warns about.

Careful:Both baud rate AND framing configuration (data bits, parity, stop bits) must match between both ends of a UART link — a mismatch in either produces garbled or misaligned data.

Try it: computing even parity for a data byte

Calculating the parity bit that would accompany a byteC: edit and run

With even parity, the parity bit is chosen so the total count of 1-bits (data plus parity) comes out even -- a basic single-bit error check.

Check yourself

1. What is the purpose of the UART start bit?