Home / Learn Embedded C / UART: The Basics

UART: The Basics

A simple two-wire, asynchronous serial protocol used constantly in embedded systems.

The short versionA simple two-wire, asynchronous serial protocol used constantly in embedded systems.

Theory in plain words

A minimal UART connectionTX (this device) -> RX (other device)RX (this device) <- TX (other device)GND (shared ground reference, required)
A minimal UART connection

Definition

UART (Universal Asynchronous Receiver/Transmitter) sends data one bit at a time over a single wire in each direction (TX and RX), with no shared clock signal — both sides must agree on timing in advance.

Why you need this

UART is the simplest and most universal serial link in embedded systems — used for debug consoles, GPS modules, Bluetooth modules, and simple point-to-point communication between two chips.

How it works

Because there is no shared clock, both ends must be configured with the exact same baud rate (bits per second) in advance — if they disagree, the receiver misinterprets the bit timing and reads garbage.

Where you'll see this

  • Debug consoles
  • GPS/Bluetooth modules
  • Simple chip-to-chip links

Try it

Sending a simple message over UART (simulated)C: edit and run

UART_WRITE is this course's sandbox stand-in for the real UART transmit register/sequence.

Try it: a missing ground reference breaking the link

Checking that ground is connected before trusting a UART linkC: edit and run

TX and RX alone are not enough -- without a shared ground reference, the two devices disagree on what voltage counts as a 0 or a 1.

Test what you just read

1. Why must both ends of a UART link be configured with the same baud rate in advance?