Lesson 15 of 48 intermediate

Bus Timing, Ready Signal, and Wait States

How T-states compose a bus cycle and how slow devices stall the processor with wait states

Open interactive version (quiz + challenge)

Real-world analogy

A bus cycle is like ordering at a drive-through. T1 is when you pull up and state your order (address). T2 is when the kitchen starts preparing (setup time). T3 is when the food is handed to you (data transfer). T4 is when you drive away (cycle ends). If the kitchen is slow, you just idle at the window — those are wait states (Tw).

What is it?

A bus cycle is the sequence of T-states (T1 through T4) the 8086 uses to perform one memory or I/O transfer. T1 outputs the address, T2 sets up control signals, T3 transfers data, and T4 completes the cycle. If the memory or device is too slow, the READY pin inserts wait states (Tw) between T2 and T3 to stretch the cycle.

Real-world relevance

Wait states were a constant battle in early PC design. Fast CPUs paired with slow DRAM needed wait states — an 8 MHz 8086 with 150 ns DRAM might need 1-2 wait states per access. This directly impacted performance. The introduction of cache memory in later processors (386, 486) was specifically to eliminate wait states by keeping frequently accessed data in fast SRAM.

Key points

Code example

; Complete bus cycle timing for MOV AX, [1000h]
; Assume 5 MHz clock, memory needs 1 wait state

; === T1 (200 ns) ===
; ALE = HIGH
; AD0-AD15 = 1000h (address)
; A16-A19 = segment upper bits
; M/IO = HIGH (memory access)
; ALE falls -> 8282 latches address 1000h

; === T2 (200 ns) ===
; AD0-AD15 go tri-state
; RD asserted LOW
; DEN asserted LOW
; DT/R = LOW (read direction)
; READY sampled -> READY = LOW (memory not ready)

; === Tw (200 ns) — wait state ===
; CPU does nothing, bus held
; READY sampled again -> READY = HIGH (memory ready)

; === T3 (200 ns) ===
; Memory places data on AD0-AD15
; CPU samples data

; === T4 (200 ns) ===
; RD deasserted (HIGH)
; DEN deasserted
; Data latched into AX
; Total: 5T = 1000 ns for this read

Line-by-line walkthrough

  1. 1. T1: The address 1000h appears on AD0-AD15 and ALE pulses — the 8282 latch captures and holds this address for the rest of the bus cycle.
  2. 2. M/IO = HIGH indicates this is a memory access, not I/O. A16-A19 carry the upper address bits from the segment calculation.
  3. 3. T2: AD0-AD15 go tri-state (disconnect from driving address) and RD is pulled LOW — this tells the memory chip to start outputting data.
  4. 4. DEN enables the 8286 transceivers and DT/R = LOW sets them to 'receive' direction — data flows from memory toward the CPU.
  5. 5. READY is checked: since the memory needs more time, READY is LOW, so the CPU enters a wait state (Tw) instead of proceeding to T3.
  6. 6. During Tw, nothing changes on the bus — the CPU just waits. At the end of Tw, READY is sampled again — this time it is HIGH.
  7. 7. T3: With READY confirmed HIGH, the memory data is now valid on AD0-AD15 and the CPU samples it.
  8. 8. T4: RD goes back HIGH (deasserted), DEN is deasserted, and the data value is latched into AX. Total cycle took 5 T-states = 1000 ns.

Spot the bug

; System: 8086 at 8 MHz with 200 ns memory chips
; Problem: system crashes randomly, data corruption
;
; T-state at 8 MHz = 125 ns
; Bus cycle = 4T = 500 ns
; Memory access time = 200 ns
;
; Designer says: "200 ns < 500 ns, no wait states needed!"
; READY pin is tied permanently to VCC (always ready)
;
; But the system still has data errors...
Need a hint?
The memory access time budget is NOT the full bus cycle time — the address setup, latch delays, and transceiver delays consume part of the 500 ns.
Show answer
Bug: The designer assumed the memory has the full 500 ns bus cycle time to respond, but that is incorrect. The address is not valid until partway through T1, the latch adds propagation delay (~20 ns), and the CPU needs data to be stable before the end of T3 (setup time ~50 ns). The actual window for memory access is roughly: 500 - 125 (T1 address setup) - 20 (latch delay) - 20 (transceiver delay) - 50 (CPU data setup) = ~285 ns. With 200 ns memory this just barely fits, but at temperature extremes or voltage tolerance limits, it fails. Fix: Either add 1 wait state (making the cycle 625 ns with plenty of margin) by using the 8284A READY circuit, or use faster memory (e.g., 100 ns access time).

Explain like I'm 5

Imagine you are at a candy machine. You put in your coin (T1 — tell the machine what you want). The machine starts working (T2 — getting ready). The candy drops (T3 — you get your data). You grab it and walk away (T4 — done!). But what if the machine is really slow? You just stand there waiting... and waiting... Those extra waiting moments are 'wait states.' The READY light tells you when the candy is finally there.

Fun fact

The term 'zero wait state' became a major marketing buzzword in the late 1980s. Companies would proudly advertise 'zero wait state' memory systems as a premium feature. Today's CPUs can execute instructions in fractions of a nanosecond, but an L3 cache miss to main memory can still cost 100+ nanoseconds — the modern equivalent of wait states!

Hands-on challenge

Calculate the bus timing for a system with a 10 MHz 8086 (T-state = 100 ns) accessing memory with 250 ns access time. How many wait states are needed? What is the total bus cycle time? Then calculate the effective data transfer rate in bytes per second for continuous word (16-bit) reads. Finally, if the same system adds a 15 ns SRAM cache, how many wait states does the cache need?

More resources

Open interactive version (quiz + challenge) ← Back to course: Microprocessor A–Z