> ## Documentation Index
> Fetch the complete documentation index at: https://docs.embedder.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Oscilloscope

> Ask Embedder to capture analog signals — clock, reset, rails, comm lines — over LAN/SCPI on a Siglent SDS800X HD

In debug mode, Embedder can drive a Siglent SDS800X HD bench scope over LAN to capture analog waveforms. Supported models: SDS802X HD, SDS804X HD, SDS812X HD, SDS814X HD, SDS822X HD, SDS824X HD. Captures auto-publish to the **Power tab** of the Console panel (VS Code extension and standalone app).

<Note>
  Oscilloscope support is in **beta**. The SDS800X HD family is fully supported. Other LXI / SCPI scopes may work for some features but aren't fully verified — expect rough edges.
</Note>

## What you can probe

| Signal                 | What you're checking                              |
| ---------------------- | ------------------------------------------------- |
| Crystal / clock output | Oscillator startup, frequency, ringing            |
| `nRESET`               | Reset pulse width, edge integrity                 |
| VDD / 3V3 rail         | Droop under load, ripple                          |
| UART TX/RX             | Idle level, edge slew, glitches                   |
| SPI `SCK` / `CS`       | Clock integrity at high rates                     |
| I²C `SDA` / `SCL`      | Pull-up strength, rise time                       |
| PWM                    | Duty cycle, frequency, glitches                   |
| GPIO debug pin         | Interrupt latency (firmware toggles a pin in ISR) |

## Prerequisites

<Steps>
  <Step title="Be in debug mode">
    Run `/debug`.
  </Step>

  <Step title="Install host software">
    Embedder installs `pyvisa` and `pyvisa-py` automatically the first time you run a scope script — approve the install when prompted.
  </Step>

  <Step title="Connect the scope to LAN">
    Connect the scope to the same LAN as your host (Ethernet or Wi-Fi). Embedder browses mDNS (`_lxi._tcp` / `_vxi-11._tcp` / `_scpi-raw._tcp`) on every non-internal IPv4 NIC, so any LXI-compliant scope shows up in `hardware_status` under `metadata.discoveredScopes` with its `vendor`, `model`, `serial`, `firmware`, `ip`, and `hostname`.

    If `discoveredScopes` is empty (corporate Wi-Fi, AP isolation, mDNS blocked), set the IP directly:

    ```bash theme={"system"}
    export EMBEDDER_SCOPE_HOST=192.168.1.20
    ```

    Read the scope's IP from the front panel under **Utility → Menu → I/O → LAN Config** (DHCP is on by default). Quick reachability check: open `http://<ip>` in a browser and you should see the scope's built-in LXI status page.
  </Step>

  <Step title="Wire your probes">
    Not sure which probe goes where? Ask Embedder:

    <Frame caption="Asking Embedder for SDS812X HD wiring help">
      <img src="https://mintcdn.com/embedder/nSMaECJmg2LXNFbW/images/oscilloscope-wireup-prompt.gif?s=289eaf241ad7829afbeb1e974bc305ec" alt="User asking Embedder how to wire the Siglent scope, agent walks through the channel and ground clip" width="550" height="160" data-path="images/oscilloscope-wireup-prompt.gif" />
    </Frame>

    <Frame caption="Probing a test point with a scope probe">
      <img src="https://mintcdn.com/embedder/nSMaECJmg2LXNFbW/images/wiring-oscilloscope.gif?s=85975dd5d45a8cf061c165479da12489" alt="Connecting a scope probe tip and ground clip to a board test point" width="506" height="760" data-path="images/wiring-oscilloscope.gif" />
    </Frame>
  </Step>
</Steps>

## Example prompts

**Single-shot capture on an edge trigger:**

```txt embedder theme={"system"}
> connect to the SDS812X HD on the LAN, set channel 1 to 500mV/div DC, timebase 1ms/div, trigger on rising C1 at 1.5V, single-shot capture, and tell me the rise time
```

The agent arms a single-shot trigger, blocks until it fires, and reads the frozen acquisition. Rise time comes back via the scope's built-in measurement.

<Frame caption="Embedder driving an SDS812X HD capture in debug mode">
  <img src="https://mintcdn.com/embedder/nSMaECJmg2LXNFbW/images/oscilloscope-capture-prompt.gif?s=fed100aa1cf1a103f16f147791c8df08" alt="Embedder running a single-shot capture on the Siglent SDS812X HD and publishing the trace to the Power tab" width="514" height="174" data-path="images/oscilloscope-capture-prompt.gif" />
</Frame>

**Screenshot the scope display:**

```txt embedder theme={"system"}
> grab a BMP screenshot of the current scope display and save it under /tmp/scope.bmp
```

**Check rail integrity under load:**

```txt embedder theme={"system"}
> probe VDD while I enable the radio peripheral. is the rail clean?
```

The agent records a high-rate analog trace, looks for droop or ringing, and reports min / max / avg.

**Measure interrupt latency:**

```txt embedder theme={"system"}
> i toggle a GPIO at the start of EXTI0_IRQHandler. trigger on the rising edge of channel 1, capture both the trigger line and the GPIO, and tell me the latency.
```

You'll need a debug GPIO toggle in your ISR; the agent computes the time delta from the captured trace.

**Verify SPI clock at high rate:**

```txt embedder theme={"system"}
> capture SPI SCK on the SDS812X with the maximum memory depth — is the edge clean? are there reflections?
```

Use this when the [logic analyzer](/debug-mode/logic-analyzer) is decoding garbage — signal-integrity failures look fine in the digital decode but show up clearly on the scope. The 12-bit ADC and longer memory depth surface ringing and overshoot that lower-resolution captures miss.

**Drop to raw SCPI:**

```txt embedder theme={"system"}
> on the SDS812X, set memory depth to 100K with `:ACQ:MDEP 100K`, then run rise/fall measurements on channel 1
```

Reach for raw SCPI when the helper layer doesn't cover what you need — the Siglent SDS Series Programming Guide (EN11G) is the full API reference.

## What the agent does for you

The agent writes a Python script that opens a SCPI session over LAN, configures channels and timebase, arms the trigger, captures the waveform, and publishes the result to the Power tab. The chart is shared with power-analyzer traces, so you can correlate analog scope captures with current measurements on the same timeline.

## Common gotchas

<AccordionGroup>
  <Accordion title="Scope not discovered">
    Check that the scope is on the same LAN as your host and that you can open `http://<ip>` in a browser. If mDNS is blocked (corporate Wi-Fi, AP isolation), set `EMBEDDER_SCOPE_HOST=<ip>` and re-run `hardware_status`. If `discoveredScopes` shows the scope but `reachable: false`, follow the `suggestedFix` (typically a subnet alias like `sudo ifconfig <iface> alias <ip>/<cidr>`).
  </Accordion>

  <Accordion title="Trigger never fires">
    A single-shot capture times out after 5 s by default. Check the trigger source, level, and coupling, or ask the agent to use a longer timeout: "wait up to 30 seconds for the trigger".
  </Accordion>

  <Accordion title="Trace clipped at the top or bottom">
    V/div is too coarse for the signal — the trace runs into the rails. Ask the agent to "drop V/div to 200 mV" or whatever fits. The opposite (V/div too fine) shows a flat-looking line because the signal is way bigger than the visible window.
  </Accordion>

  <Accordion title="Capture or screenshot looks wrong on a non-SDS800X HD scope">
    Some helpers are tuned for the SDS800X HD's specifics. On other LXI / SCPI scopes those helpers may misparse data or fail — fall back to raw `scope_query` / `scope_write` calls and the vendor's programming guide, or stick to a verified SDS800X HD model for full coverage.
  </Accordion>
</AccordionGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Logic analyzer" icon="wave-square" href="/debug-mode/logic-analyzer">
    Decode digital protocols with a Saleae or Digilent.
  </Card>

  <Card title="Combined workflows" icon="diagram-project" href="/debug-mode/combined-workflows">
    Mix scope, logic, and GDB in one debug session.
  </Card>
</CardGroup>
