D Latch with Oscilloscope
D latch timing analysis with oscilloscope visualization. Study setup time, hold time, and propagation delay.
Lo que aprenderás
- 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.
Cómo funciona
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.
Pruébalo paso a paso
Configura las entradas en la simulación de arriba, lee qué debería suceder y verifícalo.
- 1CLK = running D = 0 → 1Esperado:
Q traces D during high clock; freezes during low clockLo que verás: 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 rapidlyEsperado:
Q toggles only during clock-high windowsLo que verás: Toggle D faster than the clock — the scope shows Q tracking only inside clock-high windows. Outside, Q is flat. - 3CLK = running D = static 0Esperado:
Q = 0 across the whole traceLo que verás: 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 → 1Esperado:
Q frozen at last captured valueLo que verás: Stop the clock low. Toggle D — Q ignores everything. The latch is fully closed. Re-start the clock to resume capturing.
Componentes utilizados
Aplicaciones en el mundo real
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.