D Latch with Oscilloscope
D latch timing analysis with oscilloscope visualization. Study setup time, hold time, and propagation delay.
What You'll Learn
- Use an oscilloscope to visualize latch input and output over time.
- Identify transparent and hold phases by clock level.
- See Q follow D during transparent phases and freeze during hold phases.
- Recognize the importance of waveform-based debugging in sequential logic.
- Connect oscilloscope traces to setup/hold timing requirements.
How It Works
This circuit pairs a clocked D latch with a multi-channel oscilloscope so you can see the timing relationship between clock, D input, and Q output. Watching traces over time makes the difference between transparent and hold mode obvious — and reveals why latches are level-sensitive rather than edge-triggered.
The oscilloscope traces: - Clock: Square wave from the clock generator. - D input: User-toggled or signal-generated data. - Q output: Reflects D when clock is high; freezes at the last value when clock falls.
Key timing features visible: - During clock-high: Q follows D with small propagation delay. - At clock falling edge: Q captures D's current value and holds it. - During clock-low: D may change but Q stays frozen. - At clock rising edge: Q immediately starts following D again.
This is the defining latch behaviour: level-sensitive transparency. Compare to a flip-flop whose Q only changes on a single clock edge per cycle, regardless of D activity during the rest of the cycle.
Using an oscilloscope to study sequential timing is exactly how engineers debug real circuits. Scope traces reveal setup/hold violations, glitches, and clock-domain mismatches that static analysis can miss.
Try It Step-by-Step
Set the inputs in the embed above, then read what should happen and confirm.
- 1CLK = running D = 0 → 1Expected:
Q traces D during high clock; freezes during low clockWhat you'll see: Watch the scope: every time the clock rises, Q starts following D. Every time the clock falls, Q freezes at the current value. - 2CLK = running D = toggle rapidlyExpected:
Q toggles only during clock-high windowsWhat you'll see: Toggle D faster than the clock — the scope shows Q tracking only inside clock-high windows. Outside, Q is flat. - 3CLK = running D = static 0Expected:
Q = 0 across the whole traceWhat you'll see: Static D, the latch reflects it. Q is 0 the whole time, regardless of clock. Latch behaviour reduces to a wire when D doesn't change. - 4CLK = stopped low D = 1 → 0 → 1Expected:
Q frozen at last captured valueWhat you'll see: Stop the clock low. Toggle D — Q ignores everything. The latch is fully closed. Re-start the clock to resume capturing.
Components Used
Real-World Applications
Lab debugging of sequential circuits. Real oscilloscopes (or logic analyzers) are essential for diagnosing latch/flip-flop timing issues — too-narrow setup margin, runt clock pulses, etc.
Pre-silicon timing verification. SPICE and waveform-based simulators show exactly the kind of trace this circuit displays — used to verify timing closure before tape-out.
Educational tool. Students learning sequential logic benefit enormously from seeing waveforms, not just truth tables. Behaviour over time is the essence of sequential logic.
ATE pattern verification. Automated test equipment captures device output waveforms and compares them against expected patterns — same waveform-comparison principle.
Bus protocol decoding. Logic analyzers attach to multi-bit buses and display traces of each line over time, with protocol decoders mapping waveforms to bus transactions.