ES: Communication Fundamentals

Communication in embedded systems is the structured transfer of data between devices using wired or wireless media, based on digital or analog signals.Understanding communication fundamentals is essential for designing reliable, secure, and scalable embedded and IoT systems.

Communication is the process of transferring information from one entity to another in a reliable and controlled manner.

In embedded systems, communication allows:

  • Microcontrollers to talk to sensors
  • Processors to talk to memory
  • Devices to talk to other devices
  • Systems to talk to cloud platforms
  • Humans to talk to machines

Without communication, a microcontroller is just a calculator with no awareness of the outside world.

At the lowest level, communication is always:

Information → Encoding → Transmission → Decoding → Action

Now let’s formalize this using the basic communication model.


The Basic Communication Model

Every communication system contains three fundamental elements:

txt
+----------+        Medium         +----------+
| Sender   | --------------------> | Receiver |
+----------+                       +----------+
        ^                                |
        |                                |
        +------------ Feedback -----------+

Components Explained

  • Sender (Transmitter)
  • Generates the data.

  • Medium (Channel)
  • Carries the signal (wire, air, fiber, etc.).

  • Receiver
  • Interprets the signal and extracts information.

  • Noise
  • Unwanted disturbance that corrupts data.

txt
         Noise
           ↓
Sender → Channel → Receiver

In embedded systems, noise is a serious enemy:

  • Electro Magnetic Interference (EMI)
  • Crosstalk
  • Voltage spikes
  • Radio Frequency Interference (RFI)

Understanding this model leads us to the next important question:

How is the data physically represented?


Signals: Analog vs Digital

Before discussing wired or wireless, we must understand signal types.

Analog Signals

Continuous waveform.

txt
Voltage
  |
  |     /¯\      /¯\       /¯\
  |    /   \    /   \     /   \
  |___/     \__/     \___/     \____ Time

Used in:

  • Audio
  • Radio
  • Sensors (temperature, pressure)

Digital Signals

Discrete logic levels.

txt
Voltage
  |
5V| ┌───────┐      ┌───────┐
  | │       │      │       │
0V└─┘       └──────┘       └──── Time

Used in:

  • Microcontrollers
  • Digital buses
  • Computers

Digital communication dominates embedded systems because it is:

  • Noise resistant
  • Easy to process
  • Reliable over distance (with proper design)

Now that we understand signals, we can divide communication into its two major physical categories.


Communication is the backbone of every embedded system. Whether you are interfacing sensors, designing distributed controllers, or building IoT platforms, all systems rely on reliable data exchange. Understanding communication at a fundamental level allows you to design systems that are not only functional, but also robust, scalable, and secure.

At its core, communication can be broken down into three essential dimensions:

  • Synchronization — how devices agree on timing
  • Duplex — how data flows between devices
  • Topology — how devices are physically or logically connected

These dimensions are not isolated. They build on each other, forming a layered understanding that ultimately determines which communication protocol you select. This article will walk through these concepts in a structured way, where each section naturally leads to the next.

Synchronization: Establishing a Shared Sense of Time

Before any data can be exchanged, two devices must agree on when bits are transmitted and sampled. Without this agreement, even a perfectly wired system will fail.

Synchronization defines how timing is handled between communicating nodes and is generally divided into two categories: asynchronous and synchronous communication.

Asynchronous Communication

In asynchronous communication, there is no shared clock signal between devices. Instead, both sides agree on a predefined data rate (baud rate), and each transmission is framed with additional bits to indicate the start and end of data.

md
Line Idle: 1 1 1 1 1

Transmission:
        Start   Data Bits        Stop
          ↓     1 0 1 1 0 0 1 0   ↓
----------|_____|_|_|_|_|_|_|_|___|------

Receiver detects falling edge → starts timing

Key characteristics:

  • No dedicated clock line
  • Each frame is self-synchronized using start/stop bits
  • Simpler hardware implementation
  • Susceptible to timing drift over long transmissions

Typical use cases:

  • UART communication
  • Debug interfaces
  • Low-speed device interaction

Asynchronous communication is simple and widely used, but its limitations in speed and timing precision lead us to the need for a more controlled mechanism.


Synchronous Communication

Synchronous communication introduces a shared clock signal that both sender and receiver use to coordinate data transfer.

md
Clock:   _-_-_-_-_-_-_-_
Data:    1 0 1 1 0 0 1 0
          ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
         sampled on clock edges

Key characteristics:

  • Dedicated clock signal ensures precise timing
  • Higher data rates compared to asynchronous communication
  • Reduced framing overhead
  • Increased hardware complexity (extra line and synchronization logic)

Typical use cases:

  • SPI (Serial Peripheral Interface)
  • I2C (Inter-Integrated Circuit)
  • High-speed peripherals (ADCs, flash memory)

Synchronous communication solves timing issues, but once timing is established, the next question arises: how do devices exchange data directionally? This leads directly to duplex communication.


Duplex Communication: Defining Data Flow Direction

Once timing is aligned, communication systems must define how data moves between devices. Duplex modes determine whether communication is one-way or bidirectional, and whether it happens simultaneously.

Simplex Communication

In simplex communication, data flows in only one direction.

md
[Sensor] ---------> [Microcontroller]

Characteristics:

  • Unidirectional communication
  • No feedback or acknowledgment
  • Simplest form of communication

Use cases:

  • Analog sensors
  • Broadcast systems

While simple, most real systems require feedback or control, which introduces bidirectional communication.


Half-Duplex Communication

Half-duplex allows communication in both directions, but not at the same time.

md
[Node A] <--------> [Node B]

Time Slot 1: A → B
Time Slot 2: B → A

Characteristics:

  • Shared communication medium
  • Requires arbitration or turn-taking
  • Efficient use of wiring

Use cases:

  • RS-485 networks
  • CAN bus systems

Half-duplex introduces coordination challenges such as collisions and access control. To overcome these limitations, systems may adopt full-duplex communication.


Full-Duplex Communication

Full-duplex enables simultaneous two-way communication.

md
[Node A] ========> [Node B]
[Node A] <======== [Node B]

Independent channels for TX and RX

Characteristics:

  • Simultaneous transmission and reception
  • Higher throughput
  • Requires separate channels or more complex signaling

Use cases:

  • SPI (separate MOSI/MISO lines)
  • Ethernet communication

With duplex defined, we now understand how data flows. The next logical step is to determine how multiple devices are organized and interconnected, which leads to network topology.


Network Topology: Structuring the Communication System

Topology defines how devices are arranged and how communication paths are structured. It has a direct impact on scalability, performance, and fault tolerance.

Point-to-Point Topology

The simplest topology, where two devices are directly connected.

md
[Device A] -------- [Device B]

Characteristics:

  • Dedicated communication link
  • Low latency and high reliability
  • Not scalable

Use cases:

  • UART connections
  • Direct SPI links (single slave)

As systems grow, direct connections become inefficient, leading to shared communication structures.


Bus Topology

In a bus topology, multiple devices share a common communication line.

md
        |---- Device A
        |
========|================ Shared Bus
        |
        |---- Device B
        |
        |---- Device C

Characteristics:

  • Efficient wiring
  • Requires arbitration mechanisms
  • Risk of collisions and contention

Use cases:

  • I2C
  • CAN bus

Bus systems introduce complexity in managing access to the medium. To improve organization, centralized structures are often used.


Star Topology

In a star topology, all devices connect to a central node.

md
           [Device A]
                |
[Device B] --- [Hub] --- [Device C]
                |
           [Device D]

Characteristics:

  • Centralized control
  • Easy fault isolation
  • Single point of failure (hub)

Use cases:

  • Ethernet networks
  • Switch-based architectures

For systems requiring high reliability and redundancy, even more advanced structures are used.


Mesh Topology

In mesh topology, devices are interconnected with multiple paths.

md
   [A]------[B]
    | \    / |
    |  \  /  |
    |   \/   |
    |   /\   |
    |  /  \  |
   [C]------[D]

Characteristics:

  • Multiple communication paths
  • High fault tolerance
  • Complex routing and management

Use cases:

  • Zigbee networks
  • Industrial IoT systems

From Fundamentals to Real Communication Systems

At this point, the relationship between synchronization, duplex, and topology becomes clear. These are not independent concepts; they combine to define real-world communication protocols.

md
Synchronization  → defines timing
        ↓
Duplex          → defines direction
        ↓
Topology        → defines structure
        ↓
Protocol Choice → defines implementation

For example:

  • UART: Asynchronous + Simplex/Full + Point-to-Point
  • SPI: Synchronous + Full Duplex + Star
  • I2C: Synchronous + Half Duplex + Bus
  • CAN: Synchronous + Half Duplex + Bus with arbitration
  • Ethernet: Synchronous + Full Duplex + Star