What Is UART?

UART stands for Universal Asynchronous Receiver-Transmitter. It is a hardware communication interface commonly used to exchange serial data between electronic devices.

UART is widely used in microcontrollers, development boards, sensors, GPS modules, Bluetooth modules, computers, and other embedded systems.

Unlike communication protocols such as I2C and SPI, UART normally does not require a shared clock signal. Instead, the transmitter and receiver agree on communication settings such as the baud rate and use those settings to interpret the transmitted bits.

What Does UART Do?

UART converts data between parallel data used internally by a processor and serial data transmitted one bit at a time over a communication line.

For example, a microcontroller may have a byte of data available internally. The UART peripheral can take that byte, add the required framing bits, and transmit it serially through the TX pin.

A UART receiver performs the opposite operation. It receives the serial bit stream through the RX pin, interprets the frame, removes the framing information, and reconstructs the original data byte.

What Does UART Stand For?

UART means Universal Asynchronous Receiver-Transmitter.

Universal

UART hardware can be configured for different communication settings, allowing it to communicate with many types of serial devices.

Asynchronous

UART communication normally does not use a separate clock wire shared between the transmitter and receiver.

Receiver-Transmitter

A UART peripheral contains logic for both transmitting and receiving serial data.

UART Is a Serial Communication Interface

UART sends data serially, meaning the bits are transmitted one after another over a communication line.

For example, an 8-bit value contains eight bits. Instead of sending all eight bits simultaneously over eight separate data wires, UART can transmit them sequentially over a single TX data line.

The receiver reconstructs the byte by sampling the incoming signal at the expected timing.

Why Is UART Called Asynchronous?

UART is called asynchronous because the transmitter and receiver do not share a dedicated clock signal.

Both sides must therefore agree beforehand on timing parameters, especially the baud rate. The receiver uses its own clock to determine when to sample the incoming data.

The start bit and stop bit in each UART frame also help the receiver identify the boundaries of transmitted data.

UART TX and RX Pins

A basic UART connection commonly uses two signal lines: TX and RX.

TX

TX stands for Transmit. It is the output used by a device to send serial data.

RX

RX stands for Receive. It is the input used by a device to receive serial data.

The TX pin of one device is normally connected to the RX pin of the other device, and the RX pin is connected to the TX pin.

Why Are TX and RX Crossed?

Communication works because one device's transmitter needs to connect to the other device's receiver.

For example, if a microcontroller sends data to a computer through UART, the microcontroller TX line connects to the computer RX input. The microcontroller RX line connects to the computer TX output if data also needs to travel in the opposite direction.

What About Ground?

UART connections generally also require a common electrical reference, usually called GND.

A typical connection between two compatible UART devices therefore includes TX, RX, and GND.

The voltage levels must also be compatible. A UART peripheral using 3.3 V logic should not automatically be connected directly to a device using a different electrical voltage standard.

What Is a UART Frame?

UART does not normally transmit a raw byte by itself. The data is placed inside a structure called a UART frame.

A typical UART frame contains a start bit, a number of data bits, an optional parity bit, and one or more stop bits.

Start Bit

The start bit indicates that a new UART frame is beginning.

When the line is idle, it is typically held in the logic-high state. The transmitter begins a frame by driving the line to the opposite state for the start bit.

The receiver detects this transition and uses it to synchronize its sampling of the incoming frame.

Data Bits

The data bits contain the actual value being transmitted.

A common UART configuration uses 8 data bits, allowing one byte to be transmitted in each frame.

Other configurations can use different numbers of data bits depending on the UART hardware and communication requirements.

Parity Bit

A parity bit is optional and can provide a simple form of error detection.

Depending on the configuration, the parity can be even or odd. The receiver checks the received bits to determine whether the expected parity relationship is present.

Parity can detect some transmission errors, but it does not provide strong error correction or guarantee that every error will be detected.

Stop Bit

The stop bit marks the end of the UART frame and returns the line to its idle state.

UART configurations commonly use one stop bit, although other configurations are possible.

A Typical UART Configuration

A commonly encountered UART configuration is 8 data bits, no parity, and one stop bit. This is often written as 8N1.

The 8 means eight data bits, N means no parity, and 1 means one stop bit.

What Is Baud Rate?

Baud rate describes the signaling rate used for serial communication. In common UART configurations where each symbol represents one bit, it corresponds to the number of bits transmitted per second.

Common UART settings include 9600, 19200, 38400, 57600, and 115200 baud.

The transmitter and receiver must use compatible baud-rate settings. If the settings differ significantly, the receiver may sample the signal at the wrong times and interpret the data incorrectly.

How Does UART Send a Character?

Suppose a microcontroller wants to send the character A.

The software provides the character to the UART peripheral. The UART converts the character into the configured serial frame, adds the start and stop information, and sends the resulting bits through the TX pin.

The receiving UART detects the start bit, samples the incoming data bits according to the configured timing, checks the optional parity bit, and verifies the stop bit.

It then reconstructs the original byte and makes it available to the receiving processor.

How Does the Receiver Know When to Sample?

Because UART has no shared clock line, the receiver uses its local clock and the configured baud rate to determine when the incoming signal should be sampled.

The start bit gives the receiver a reference point for the beginning of the frame. The receiver then samples the expected positions of the data bits.

UART hardware often uses oversampling to improve the reliability of bit timing.

Full-Duplex UART Communication

UART can commonly support full-duplex communication, meaning both devices can transmit and receive at the same time.

This is possible because TX and RX use separate signal lines.

For example, a microcontroller can send a command through TX while simultaneously receiving sensor data through RX.

What Is Half-Duplex UART?

Some serial interfaces can be configured for half-duplex communication, where communication in both directions shares a signal path and devices take turns transmitting.

The exact behavior depends on the UART hardware and the electrical interface being used.

UART vs USART

UART and USART are related peripherals, but they are not exactly the same.

UART generally refers to asynchronous serial communication. USART stands for Universal Synchronous/Asynchronous Receiver-Transmitter and can support asynchronous communication as well as certain synchronous modes.

The terminology and capabilities depend on the particular microcontroller.

Is UART a Protocol?

UART is often called a protocol, but more precisely it is a hardware interface and communication mechanism that defines how serial data is framed and transmitted.

A higher-level protocol can run on top of UART. For example, a device might define commands, message formats, checksums, or packet structures that are transmitted as UART bytes.

UART Does Not Define the Meaning of the Data

UART determines how bits are transmitted, but it does not normally define what those bytes mean.

For example, one device might interpret the byte sequence as text, while another device might interpret the same bytes as sensor measurements or commands.

The communicating devices therefore need to agree on the higher-level data format.

What Is UART Used For?

UART is extremely common in embedded systems because it is simple, inexpensive, and supported by many microcontrollers.

Debugging

Developers often use UART to print diagnostic messages from a microcontroller to a computer or serial terminal.

GPS Modules

GPS and GNSS modules commonly provide serial interfaces through which position and navigation information can be exchanged.

Bluetooth Modules

Many Bluetooth modules provide a UART-style interface to a microcontroller, allowing the microcontroller to exchange data with the wireless module.

Serial Consoles

Embedded Linux systems and development boards can expose a UART interface as a console for configuration, debugging, and system logs.

UART and Microcontrollers

Most modern microcontrollers include one or more UART or USART peripherals.

Software can configure parameters such as baud rate, data length, parity, stop bits, and interrupt behavior.

Once configured, the UART peripheral can transmit and receive data without requiring the CPU to manually control every individual bit.

Polling vs Interrupts

A microcontroller can interact with UART using polling or interrupts.

Polling

With polling, the processor repeatedly checks whether new data has arrived or whether the transmitter is ready for another byte.

Interrupts

With interrupts, the UART peripheral can notify the processor when an important event occurs, such as receiving a byte or completing a transmission.

Interrupt-driven UART communication can allow the processor to perform other work instead of continuously checking the UART hardware.

UART Buffers

UART peripherals and software drivers often use buffers to temporarily store transmitted or received data.

A receive buffer is especially useful when data arrives while the processor is busy performing another task.

If the software does not process incoming data quickly enough and the available buffer becomes full, data can be lost.

What Happens When the Baud Rates Do Not Match?

If the transmitter and receiver use incompatible baud rates, the receiver may sample bits at incorrect times.

This can produce corrupted characters, framing errors, random-looking output, or complete communication failure.

For this reason, both devices must normally be configured with compatible communication parameters.

What Is a Framing Error?

A framing error occurs when the receiver does not detect the expected frame structure, such as an invalid stop-bit condition.

It can be caused by incorrect baud-rate settings, electrical noise, incompatible configuration, or other communication problems.

What Is a Parity Error?

A parity error occurs when the received data does not satisfy the configured parity rule.

It can indicate that one or more bits may have been corrupted during transmission.

UART Voltage Levels

UART describes the serial communication behavior, but UART alone does not specify one universal electrical voltage standard.

For example, a microcontroller may use 3.3 V or 5 V logic levels for its UART pins, while other serial interfaces use different electrical signaling standards.

This is why it is important to distinguish a microcontroller's UART logic pins from interfaces such as RS-232 and RS-485.

UART vs RS-232

UART and RS-232 are not the same thing.

UART describes the serial data framing and transmission mechanism, while RS-232 defines an electrical interface standard with its own voltage levels and signaling requirements.

A UART peripheral can therefore be connected to an RS-232 interface through appropriate level-shifting hardware.

UART vs RS-485

RS-485 is another electrical communication standard that commonly uses differential signaling and can support communication over longer distances and in electrically noisy environments.

A UART peripheral can be connected to an RS-485 transceiver, allowing UART-formatted data to travel through an RS-485 physical interface.

UART vs I2C

UART and I2C are both commonly used for communication between electronic devices, but they work differently.

UART

UART normally uses separate TX and RX lines, does not require a shared clock, and commonly connects two devices directly.

I2C

I2C uses shared clock and data lines and supports addressing multiple devices on the same bus.

UART vs SPI

SPI is another common embedded communication interface.

SPI generally uses a clock signal and separate data lines, while UART is asynchronous and does not use a shared clock line.

SPI can provide high-speed communication over short distances, while UART is particularly convenient for simple point-to-point serial communication.

What Is a USB-to-UART Adapter?

A USB-to-UART adapter allows a computer with USB connectivity to communicate with a device that exposes UART signals.

The adapter converts data between USB and UART signaling. Common uses include programming, debugging, configuring embedded devices, and viewing serial logs.

UART Communication Example

Imagine a microcontroller connected to a GPS module.

The GPS module sends navigation information through its TX output. The microcontroller connects its RX input to the GPS TX output and receives the serial data.

If the microcontroller also needs to send commands to the GPS module, its TX output can be connected to the GPS RX input.

Both devices must agree on parameters such as baud rate, data bits, parity, and stop bits.

A Simple UART Data Flow

A simplified UART communication process is: application data → UART peripheral → frame generation → TX signal → physical connection → RX signal → frame detection → data reconstruction → application.

Advantages of UART

UART is popular because it is simple to implement and understand.

It requires relatively few signal lines, is supported by many microcontrollers, and works well for point-to-point communication.

UART is also convenient for debugging because serial terminals make transmitted text easy for developers to inspect.

Limitations of UART

UART is not ideal for every communication requirement.

Basic UART does not inherently provide device addressing, collision management, strong error correction, or a standardized high-level message format.

The practical communication distance and speed also depend on the electrical interface, hardware, cable, noise environment, and configuration.

Does UART Need a Clock?

Basic asynchronous UART communication does not use a separate clock wire between the communicating devices.

Instead, both devices use their own clocks and agree on the baud rate so the receiver can determine when to sample each bit.

Does UART Need TX, RX, and GND?

For a typical two-device UART connection, TX, RX, and a common ground are commonly used.

TX and RX are crossed between the devices, while the grounds provide a common electrical reference.

The exact wiring depends on the electrical interface and hardware being used.

Is UART Fast?

UART can support a wide range of communication speeds, but the practical maximum depends on the specific UART hardware and physical connection.

For many embedded applications, speeds such as 9600 or 115200 baud are sufficient. Higher rates are also possible on suitable hardware and connections.

The Complete UART Journey

A simplified UART transmission can be represented as: application creates data → UART receives the byte → UART creates a frame → start bit is transmitted → data bits are transmitted → optional parity is transmitted → stop bit is transmitted → receiver detects the frame → receiver samples the bits → receiver checks the frame → original data is reconstructed.

Why Understanding UART Matters

UART is one of the most useful interfaces to understand when working with microcontrollers and embedded systems.

Understanding TX and RX, baud rate, framing, parity, voltage levels, and serial terminals makes it much easier to debug embedded devices and connect peripherals such as GPS modules, Bluetooth modules, sensors, and development boards.

In simple terms, UART is a method for sending data one bit at a time between devices without requiring a shared clock. The devices agree on the communication settings, frame the data with start and stop information, and use TX and RX lines to exchange the serial data.

The simplest way to understand UART is this: UART is a hardware interface that converts bytes into serial bits for transmission and converts received serial bits back into bytes.

The transmitter and receiver agree on settings such as baud rate, data bits, parity, and stop bits. The transmitter sends framed data through TX, while the receiver reads it through RX and reconstructs the original bytes.

Note: Tip: After learning UART, explore USART, baud rate, UART framing, RS-232, RS-485, USB-to-UART adapters, I2C, SPI, serial debugging, interrupts, DMA, and embedded communication protocols.