SPI-05: Multi-Slave Topologies — Independent & Daisy-Chain — VLSI Trainers
SPI Series · Article 5 of 6

SPI-05: Multi-Slave Topologies

Connecting multiple slaves to one SPI master — the two topologies, their trade-offs, how tristate buffers solve the MISO conflict, and how daisy-chaining turns a bus into a giant shift register.

The Multi-Slave Problem

A standard SPI channel connects one master to one slave. But in real embedded systems — a PCB with an accelerometer, a DAC, a flash chip, and a display controller — all sharing one SPI bus off a single microcontroller — you need to connect multiple slaves to one master.

This creates two specific problems that the basic SPI channel design does not address:

Problem 1 — Selecting one slave

The basic SPI channel has one SS wire. Asserting it LOW selects the slave. With multiple slaves, asserting this single wire would activate all slaves simultaneously — every slave would try to respond to the exchange at the same time.

Problem 2 — Multiple MISO drivers

If multiple slaves share the same MISO wire and all drive it simultaneously, their outputs conflict. One driving HIGH and another driving LOW creates a short circuit — same as wiring two totem-pole outputs together (from DE-07 logic families).

There are exactly two topological solutions, each solving these problems in a different way:

🔀Independent Configuration

The independent (parallel) configuration is the more common of the two. Each slave gets its own dedicated Slave Select line from the master. All slaves share the same SCLK and MOSI wires. MISO lines from all slaves are connected together (shorted) — but each slave drives MISO through a tristate buffer.

Figure 1 — Independent configuration: 1 master, 3 slaves
SPI Master (MCU / CPU) SCLK MOSI MISO SS1̄ SS2̄ SS3̄ Slave 1 (e.g. accelerometer) SCLK MOSI SS̄ MISO ⊗ tristate Slave 2 (e.g. DAC) SCLK MOSI SS̄ MISO ⊗ tristate Slave 3 (e.g. flash memory) SCLK MOSI SS̄ MISO ⊗ tristate SCLK MOSI MISO — shared (tristate buffered) SS1̄ SS2̄ SS3̄ SCLK (broadcast, master→all) MOSI (broadcast, master→all) MISO (shared rail, ⊗ tristate, slave→master) SSn̄ (individual per slave)

Independent (parallel) configuration. SCLK and MOSI are broadcast to all slaves via shared vertical rails. Each slave has its own dedicated SS̄ line entering its top pin. All slave MISO outputs connect to a shared vertical MISO rail (right side), each through a tristate buffer (⊗) — only the selected slave drives the bus; the rest are in Hi-Z.

🔳Tristate Buffers on MISO

The tristate buffer (three-state buffer) is what makes the shared MISO wire safe. It has three possible output states:

Enable (SS̄)InputOutput
0 (selected)data bitdrives 0 or 1 normally
1 (not selected)anyHi-Z (high impedance — disconnected)
Figure 2 — Tristate buffer: selected vs not-selected behaviour
Selected Slave (SS̄ = LOW = 0) SS̄=0 data 0 or 1 (drives MISO bus) Buffer is transparent — output = input Not Selected Slave (SS̄ = HIGH = 1) SS̄=1 data Hi-Z (electrically disconnected) Buffer disabled — output floats off the bus

When SS̄=LOW (selected), the tristate buffer actively drives its data onto the shared MISO bus. When SS̄=HIGH (not selected), the buffer enters Hi-Z state — its output is electrically disconnected from the MISO bus, as if the wire was cut. Only one slave is selected at a time, so only one buffer drives MISO.

Hi-Z in action: Exactly one slave has SS̄ asserted LOW at any time in independent configuration. Its tristate buffer drives MISO. All other slaves have SS̄=HIGH, so their tristate buffers are in Hi-Z — they do not interfere with the active MISO signal. The pull-up resistor on MISO (often required) ensures the line does not float to an undefined level when no slave is selected.
Never assert two SS̄ lines simultaneously in independent configuration. Even though each slave has a tristate buffer, if two slaves are selected at once, both drive MISO simultaneously — one with 0, one with 1 — causing a bus contention that corrupts data and may damage the drivers.

📊Independent Config — Exchange Waveform

From a timing perspective, independent configuration looks identical to a single-slave exchange. The only difference is which SS̄ line is asserted. All three slaves see SCLK and MOSI, but only the selected slave responds on MISO.

Figure 3 — Independent config: selecting Slave 2 (SS2̄ asserted), Slaves 1 & 3 remain idle
SS1̄ SS2̄ SS3̄ SCLK MOSI MISO SS1̄ = 1 — Slave 1 not selected (Hi-Z on MISO) SS3̄ = 1 — Slave 3 not selected (Hi-Z on MISO) idle SS2̄ LOW — Slave 2 active, exchange running idle header / data for Slave 2 (e.g. 0xD3) MISO driven by Slave 2 (e.g. 0x5A) — Slaves 1,3 in Hi-Z

Only SS2̄ is asserted LOW. SS1̄ and SS3̄ remain HIGH — Slaves 1 and 3 are idle with their MISO tristate buffers in Hi-Z. Slave 2 drives the shared MISO bus. SCLK and MOSI reach all three slaves, but only Slave 2 processes them.

🔗Daisy-Chain Configuration

The daisy-chain configuration takes a completely different approach. Instead of individual SS lines, there is a single shared SS wire. Instead of separate MISO lines, the MISO of each slave connects to the MOSI of the next slave — forming a single long shift-register chain through all slaves back to the master.

Figure 4 — Daisy-chain configuration: 1 master, 3 slaves in series
Master SCLK MOSI MISO SS̄ Slave 1 SCLK MOSI MISO SS̄ Slave 2 SCLK MOSI MISO SS̄ Slave 3 SCLK MOSI MISO SS̄ MOSI S1.MISO→S2.MOSI S2.MISO→S3.MOSI S3.MISO → master MISO (return path) SS̄ (single shared — all slaves in or out together) Shift-register chain: Master→S1→S2→S3→Master One shared SS̄ · SCLK to all · MISO of each slave feeds MOSI of next

Daisy-chain configuration. SCLK and SS̄ are broadcast to all slaves. Master’s MOSI drives Slave 1’s MOSI. Slave 1’s MISO drives Slave 2’s MOSI. Slave 2’s MISO drives Slave 3’s MOSI. Slave 3’s MISO returns to the master. This forms a single long shift register: Master→S1→S2→S3→Master.

➡️Daisy-Chain — How Bits Flow

With 3 slaves, one exchange in daisy-chain mode is 3 × 8 = 24 bits long (SS̄ stays LOW for 24 clock cycles). Here is exactly what happens at each stage:

Figure 5 — Daisy-chain bit flow: 3 slaves, 24-bit exchange (bytes B0, B1, B2)
Phase 1 cycles 1–8 Phase 2 cycles 9–16 Phase 3 cycles 17–24 Master sends Slave 1 holds Slave 2 holds Slave 3 holds B2 (byte for S3) shifting B2 in → receiving S1 out receiving S2 out B1 (byte for S2) holds B2 → shifting B1 in B2 shifting in → shifting through B0 (byte for S1) ✓ latches B0 ✓ latches B1 ✓ latches B2 SS̄ deasserts after cycle 24 → each slave captures its final 8-bit byte from its shift register Key: Master sends bytes in reverse order — last slave’s byte first (B2), first slave’s byte last (B0)

Daisy-chain bit flow for 3 slaves. Master sends B2 first (for Slave 3), then B1 (for Slave 2), then B0 (for Slave 1). After 24 clock cycles, each slave’s shift register contains exactly one byte. When SS̄ deasserts, all slaves simultaneously capture their byte.

Critical ordering rule: In daisy-chain mode, the master must transmit bytes in reverse order — the byte intended for the last slave in the chain must be sent first. This is because the first byte sent ripples through all slaves to reach the end of the chain by the time the exchange completes. The byte sent last is still in Slave 1’s shift register when SS̄ deasserts.

📏Daisy-Chain — Exchange Length

With s slaves in daisy-chain, every exchange uses s × 8 clock cycles. All slaves participate in every exchange — there is no way to address just one slave. This is the fundamental constraint of daisy-chain topology.

Number of slaves (s)Exchange length (bits)Clock cycles per exchangeBytes transmitted
1881
216162
324243
432324
ss × 8s × 8s
🔍 Worked Example — Daisy-Chain Decode

Setup: 1 master + 3 slaves in daisy-chain, CPOL=0, CPHA=0, MSB first. Master needs to send: 0x42 to Slave 1, 0x17 to Slave 2, 0xF0 to Slave 3.

Transmission order (last slave first):

Cycles 1–8: 0xF0 (for Slave 3)
Cycles 9–16: 0x17 (for Slave 2)
Cycles 17–24: 0x42 (for Slave 1)

After 24 cycles, SS̄ deasserts. Each slave latches what is in its shift register:

Slave 1 shift reg = 0x42 ✓
Slave 2 shift reg = 0x17 ✓
Slave 3 shift reg = 0xF0 ✓

Why? 0xF0 was sent first and travelled through S1 (8 cycles) then S2 (8 cycles) to reach S3’s shift register by cycle 24. 0x42 was sent last and is still in S1’s shift register when SS̄ deasserts.

⚖️Side-by-Side Comparison

FeatureIndependentDaisy-Chain
SS lines required1 per slave (N total)1 shared
MOSI wires1 shared1 between each pair (same net)
MISO wires1 shared (tristate)separate per slave (chained)
Tristate buffers needed?Yes — on each slave MISONo — each MISO drives only the next MOSI
Exchange length8 bitss × 8 bits
Address one slave selectively?Yes — assert only that SS̄No — all slaves participate
Byte transmission orderNormalReversed (last slave first)
Max slaves limited by…Available GPIO pins for SS̄Exchange timing budget (latency ∝ s)
Typical use casesMixed peripheral buses (ADC + DAC + flash)LED shift registers, scan chain testing, identical device arrays
Which should you use? In almost all practical embedded designs, independent configuration is preferred. It is simpler to program (normal bit order, direct slave addressing), each slave is truly isolated, and adding more slaves only costs one GPIO pin per slave. Daisy-chain is used in specific situations: LED driver chains (e.g. multiple MAX7219 ICs), JTAG-style scan chains, or when the master has very few GPIO pins available.

🔬VLSI Connections

🔬 Tristate buffers and open-drain buses in VLSI

The tristate buffer on MISO in independent configuration is a direct application of the open-collector / tristate output concepts from DE-07 (Logic Families). The same circuit technique is used for the I²C bus (open-drain + pull-up), the CPU data bus (tristate drivers on each source), and DDR memory data buses (on-die termination with controlled impedance). The concept is identical: multiple potential drivers share one wire, but only one drives at a time — enforced either by explicit enable signals (tristate) or by pull-up and open-drain design (wired-AND). Bus contention, when two drivers fight, causes exactly the current-spike problem discussed in DE-07 totem-pole conflict.

🔬 JTAG and scan chains = daisy-chain SPI

JTAG (IEEE 1149.1), the standard test access port used in every modern chip, is architecturally identical to SPI daisy-chain. TDI (Test Data In) is MOSI, TDO (Test Data Out) is MISO, TCK is SCLK, TMS is SS. When multiple JTAG devices are on a board, they are connected in a daisy-chain with TDO→TDI between each device — exactly Figure 4. The shift register inside each JTAG device is the device’s scan chain. Understanding SPI daisy-chain gives you the mental model for how DFT scan chains and JTAG work at the board level.

🔬 SPI peripheral addressing in SoC design

On a typical SoC PCB, the MCU or application processor has a fixed number of GPIO pins available for SPI SS̄. A high-density design might use a 3-to-8 decoder IC on three GPIO outputs to drive up to 8 SS̄ lines — exactly the decoder design from DE-06 (Combinational Circuits). This trades 3 GPIO pins for 8 device-select signals. Alternatively, an I/O expander IC (itself connected over SPI in independent config!) adds more GPIO pins. The hardware-level decision between independent and daisy-chain topology is made during PCB design and RTL SoC integration — both require the engineer to understand what is happening at the wire level.

Summary — SPI-05 key points: Two topologies solve the multi-slave problem. Independent: one SS̄ per slave, shared MISO bus made safe by tristate buffers (Hi-Z for unselected slaves), standard 8-bit exchanges, any slave addressable directly. Daisy-chain: one shared SS̄, slaves chained MISO→MOSI, all slaves participate in every exchange, exchange length = s×8 bits, bytes must be transmitted in reverse order (last slave’s byte first). Independent is the practical default; daisy-chain is used for LED chains, scan chain testing, and pin-constrained systems.
Scroll to Top