Skip to content
LSLab

Overview of UART, RS-485 and Modbus RTU

  • Starter
  • Article
  • Ages 10+
  • 4 min read
An industrial controller is cabled to a DIN-rail measurement meter on a test bench.

UART, RS-485 and Modbus RTU are different parts of serial communication that often appear together in measuring and control devices. UART handles asynchronous serial data, RS-485 defines the electrical differential link, and Modbus RTU defines addressed requests and replies.

Contents
Three layers: data frame, line, then ask and answer.
  • UART: frames the data
  • RS-485: differential line
  • Modbus RTU: ask and answer

What you will learn

  • Tell UART, RS-485 and Modbus RTU apart.
  • Connect TX and RX correctly between two devices.
  • Understand that, in a basic unicast exchange, the master asks and the addressed slave normally answers.

Before you start

It helps to know what a digital signal is.

How does UART join two devices?

A UART is a block of circuitry responsible for implementing serial communication. Asynchronous means that data is transferred without support from an external clock signal. In a two-device bidirectional UART link, each RX commonly connects to the other device’s TX. Check signal-voltage compatibility; do not directly connect interfaces with incompatible voltage levels.

A UART TX/RX link is not the RS-485 bus itself. In the TI reference design, an RS-485 driver is automatically enabled when an MCU or UART outputs data. This design uses a separate transceiver rather than wiring UART pins straight to the bus pair.

One side's transmit pin goes to the other side's receive pin.
  • First device
  • Second device
  • Crossed TX and RX lines

How does RS-485 carry signals far?

The RS-485 receiver compares the voltage difference between both lines, instead of the absolute voltage level on one line; differential signaling still has receiver common-mode voltage limits. Differential signals and twisting allow RS-485 to communicate over much longer distances than RS-232. Of RS-232, RS-422, RS-423 and RS-485, RS-485 is the only one that can network multiple transmitters and receivers on the same network.

Simplified illustration of a common shared twisted-pair arrangement.
  • Twisted differential pair
  • Devices on the line

How does Modbus RTU ask and answer?

Modbus is a request-response protocol implemented using a master-slave relationship. In a unicast exchange, the address in the message header identifies the destination that should reply. In NI’s example, on most Modbus RTU networks a master may send an output command to broadcast address 0; slaves are expected to process it and not respond. Successful processing is not guaranteed. Modbus RTU uses time gaps of silence on the communication line for framing.

In unicast, the addressed slave normally replies; broadcast has no reply, and RTU uses silence to frame messages.
  • Master
  • Slave with the matching address
  • Silent gap

Real-world example

Hypothetical example, not wiring instructions: with an adult, picture a row of meters in a building. In this illustrative setup, they share a twisted pair and a monitoring system asks each meter by address; the addressed meter replies when it successfully receives and handles the unicast request.

Common misunderstandings

Joining TX to TX is correct. In a two-device bidirectional UART link, each RX commonly connects to the other device’s TX. Check signal-voltage compatibility; do not directly connect interfaces with incompatible voltage levels.

A UART TX/RX link is not the RS-485 bus itself. In the TI reference design, an RS-485 driver is automatically enabled when an MCU or UART outputs data. This design uses a separate transceiver rather than wiring UART pins straight to the bus pair.

RS-485 measures voltage against ground. The receiver compares the voltage difference between both lines.

Frequently asked questions

What is a UART?

A block of circuitry responsible for implementing serial communication.

Why does RS-485 reach farther than RS-232?

Thanks to differential signals and twisting.

How do master and slave differ?

Modbus uses a master-slave relationship in the basic model: the master initiates a request, and the reply depends on request type and addressing; broadcast has no reply.

What does Modbus RTU use for framing?

Time gaps of silence on the communication line.

Summary

  • UART carries out asynchronous serial communication over RX and TX.
  • RS-485 uses differential signals and twisting to reach farther; actual distance also depends on data rate and line conditions.
  • Modbus RTU is ask and answer by address, with frames marked by silence.

Terms in this article

English and Vietnamese terms, with the meanings used here. Hover, tap or Tab to a term with a dotted underline for an explanation as you read.

Universal asynchronous receiver/transmitterUART
A block of circuitry that implements serial communication.
RS-485
A differential serial interface; a two-wire half-duplex bus is common, but it is not the only arrangement.
Differential signalTín hiệu vi sai
A signal over two lines whose receiver compares the voltage difference between them.
Modbus RTU
The request-response Modbus mode that marks frames with silent gaps on the line.
Master and slaveMaster và slave
In a basic unicast exchange, the master starts a request and the addressed slave replies.

This article is not marked as viewed

Spotted something wrong or unsafe?

Tell the administrator by email. The message already has the article title and address.

Report this article
  • Three measurement modules connect along one shared red-and-black twisted-pair cable.
    Basic

    How Does RS-485 Transmit Differential Signals?

    RS-485 sends signals over two wires and compares the voltage between them, so it resists noise, reaches far and lets many devices share one line.

    Internet of Things (IoT)4 min read
  • An industrial controller and a DIN-rail digital meter are connected by cable on a test bench.
    Basic

    How Does Modbus RTU Exchange Data?

    Modbus RTU works by request and response between a master and slaves. See addresses, function codes, error checks and how frames are split by silent gaps.

    Internet of Things (IoT)4 min read
  • A full-size microcontroller development board and a small wireless module sit side by side.
    Starter

    Overview of ESP32, Arduino and Other Boards

    An overview of ESP32 and Arduino boards and how to choose by connectivity, voltage, power and microcontroller.

    Internet of Things (IoT)4 min read
  • A compact microcontroller board with a metal shield is wired to a temperature sensor.
    Basic

    How Does an ESP32 Board Run and Communicate?

    An ESP32 board pairs an ESP32 module with a USB port and pin headers. See its parts, how firmware is loaded over serial, and its Wi-Fi and Bluetooth.

    Internet of Things (IoT)4 min read
See all articles of the topic

Sources

These sources are written for older readers. If they feel hard, read them with an adult.