Chapter 3: RS‑485: Differential Serial Communication

📚 Chapter 3: RS-485 Differential Serial Communication

🎯 Learning Objectives

By the end of this lesson, students will be able to:

  • Explain the purpose and advantages of RS‑485
  • Interpret RS‑485 differential voltage levels
  • Distinguish half‑duplex vs full‑duplex wiring
  • Understand tri‑state transmitters and multidrop networks
  • Apply termination and biasing correctly
  • Decode RS‑485 waveforms Prepare for Asgn03, Lab02, and Project02

1️⃣ Introduction to RS-485

RS‑485 (EIA‑485) is a physical‑layer serial communication standard designed for:

  • Long distances
  • High noise environments
  • Industrial networks
  • Multidrop (many devices on one bus)
  • Differential signaling It improves on RS‑232 by using balanced differential transmission, which dramatically increases noise immunity and cable length.

2️⃣ Differential Signaling Basics

RS‑485 uses two wires, A and B, carrying opposite signals. The receiver looks only at the difference:

  • Mark (1) → A more negative than B

  • Space (0) → A more positive than B

flowchart LR
    Aline[A Line Voltage]
    Bline[B Line Voltage]
    Diff[Receiver Measures
A - B] Aline --> Diff Bline --> Diff

Differential signaling cancels common‑mode noise and allows long cable runs.

3️⃣ RS-485 Voltage Levels

Condition Voltage Range (A - B) Logic State
Dominant (Mark) -0.2V to -6V 1
Recessive (Space) +0.2V to +6V 0
Transition region ±0.2V Undefined

Noise margin is built in:

  • Receiver accepts anything more negative than −0.2 V as a 1
  • Receiver accepts anything more positive than +0.2 V as a 0
  • Driver nust provide a minimum of ±1.5 V differential

This is why RS‑485 works reliably over long distances.

4️⃣ RS‑485 vs RS‑232

Feature RS-232 RS-485
Signaling Single-ended Differential
Voltage Levels ±12V ±6V differential
Max Cable Length ~15 m 1200 m
Max speed ~115,200Kbps 10 Mbps
Noise Immunity Low High
Multidrop No Yes
Wires 3+ 2 or 4
Max Nodes 1 32 (or more)

5️⃣ Half‑Duplex (2‑Wire) RS‑485

Half‑duplex uses a single differential pair for both transmit and receive. Devices must take turns transmitting.

flowchart LR
    subgraph A [Station A]
        A_TX[TxA]
        A_RX[RxA]
    end

    subgraph B [Station B]
        B_TX[TxB]
        B_RX[RxB]
    end

    A_TX --> ABpair[A/B Pair]
    ABpair --> B_RX

    B_TX --> ABpair
    ABpair --> A_RX

6️⃣ Full-Duplex (4-Wire) RS-485

Full-duplex uses separate differential pairs for transmit and receive. This allows simultaneous communication between devices. Full‑duplex uses two differential pairs:

  • Pair 1: A → B

  • Pair 2: B → A

flowchart LR
    subgraph A [Station A]
        A_TX[TxA]
        A_RX[RxA]
    end

    subgraph B [Station B]
        B_TX[TxB]
        B_RX[RxB]
    end

    A_TX --> Pair1[A/B Pair]
    Pair1 --> B_RX

    B_TX --> Pair2[A'/B' Pair]
    Pair2 --> A_RX

7️⃣ Tri-State Transmitters

RS‑485 transmitters support three states:

  • Mark (1)

  • Space (0)

  • High‑Impedance (Hi‑Z) ← essential for multidrop networks

Hi‑Z ensures that only one device drives the bus at a time. This is critical for:

  • Half‑duplex

  • Multidrop networks

  • Asgn03 Q6

8️⃣ Termination and Biasing

These ensure proper signal integrity and prevent reflections:

  • Terminate only at the two ends
  • Use resistors matching cable impedance (typically 120 Ω)
flowchart LR
    Start[Device A]
    End[Device B]

    Start ---|120Ω| Bus
    Bus ---|120Ω| End

Biasing resistors ensure the line sits at a valid MARK when idle.

  • RS‑485 uses twisted‑pair transmission lines to prevent induced currents due to magnetic fields.
  • This relates to Faraday’s Law of Induction and helps explain why differential signaling is more immune to noise.
  • It also relates to the Ampere’s Law and how current flowing through a wire generates a magnetic field.

Magnetic Field of a Wire

Magnetic Field of a Twisted Pair Wire

9️⃣ Multidrop Networks

RS‑485 supports up to 32 unit loads (modern transceivers support more).

Two‑Wire Multidrop (Half‑Duplex)

  • All devices share the same A/B pair
  • Only one transmitter active at a time
  • All others must be Hi‑Z
  • Requires addressing

Four‑Wire Multidrop (Full‑Duplex)

  • Master TX → all slave RX
  • Slave TX → master RX
  • Slaves do not talk to each other
  • No Hi‑Z needed on RX lines

🔟 RS‑485 Waveforms

RS‑485 uses the same asynchronous framing as RS‑232:

  • Start bit
  • Data bits (LSB first)
  • Optional parity
  • Stop bit(s)

But the voltage is differential, not referenced to ground.

11. Lab02 Integration (Differential Signaling)

Lab02 demonstrates:

  • Creating complementary signals
  • Observing differential voltage
  • Measuring A−B
  • Seeing noise rejection
  • Understanding why RS‑485 works

This lesson prepares students to interpret their oscilloscope captures.

12. Project02 Integration (End‑to‑End RS‑485 System)

Students must:

  • Use SN75179 transceivers
  • Build a full‑duplex RS‑485 link
  • Communicate at 250 kBaud
  • Interface with SCI0 at 115.2 kBaud
  • Use a 25 m cable
  • Demonstrate simultaneous TX/RX

This lesson provides the conceptual foundation for designing and debugging the system.

13. Summary

RS‑485 is:

  • Differential
  • Balanced
  • Noise‑resistant
  • Long‑distance
  • Multidrop‑capable
  • Industrial‑grade

It is the backbone of many real‑world automation systems.