Tutorials

Learn More

Transmitter Operation

The transmitter converts a parallel data word into a serial frame.

Basic transmit sequence:

  1. Wait in idle state with TX = 1.
  2. Accept a data word when the transmitter is not busy.
  3. Drive the start bit, TX = 0, for one bit time.
  4. Shift data bits out, LSB first.
  5. Optionally transmit parity.
  6. Drive stop bit(s), TX = 1.
  7. Return to idle or start the next frame.
UART Transmitter FSM

Receiver Operation

The receiver watches the serial input and reconstructs the frame.

Basic receive sequence:

  1. Wait for idle/high line.
  2. Detect a high-to-low transition that may be a start bit.
  3. Confirm the start bit near its middle.
  4. Sample each data bit near the middle of its bit time.
  5. Check optional parity.
  6. Check stop bit.
  7. Deliver received data and status flags.

Oversampling

Many UART receivers oversample the input, commonly at a multiple of the baud rate, to detect the start edge and choose a stable middle-of-bit sample point. For example, a receiver may use a 16x internal sampling clock, detect the start transition, then sample near the midpoint of the start bit and later bits.

Oversampling is a common implementation technique. It is not a requirement of the abstract UART frame format.

Parity

Parity adds one optional bit after the data bits.

ModeMeaning
NoneNo parity bit
EvenTotal number of 1 bits across data plus parity should be even
Odd

Total number of 1 bits across data plus parity should be odd

Example for data 8’b0101_0011:

Data ones = 4
Even parity bit = 0, because total ones already even
Odd parity bit  = 1, because total ones must become odd

Parity can detect many single-bit errors, but it is not a strong integrity mechanism. It cannot detect all multi-bit errors and does not correct data.

UART Error Conditions

ErrorGeneric meaningTypical cause
Framing errorStop bit was not observed as expectedBaud mismatch, noise, wrong frame config, line stuck low
Parity errorReceived parity does not match dataNoise, wrong parity setting, bit corruption
Overrun errorNew data arrived before previous data was consumedSoftware too slow, insufficient buffering
Break-like conditionLine held low longer than a normal character frameDeliberate break signaling, fault, wiring issue

Note: Exact status flag names and clearing behavior are implementation-specific. A generic tutorial should explain the concept without assuming a register model.