Skip to main content
A Digilent WaveForms device, such as an Analog Discovery or Digital Discovery, can capture and decode digital signals, record analog inputs, drive a waveform output, and power a small target. Use it when one bench instrument needs to both stimulate the target and observe the result. Capabilities differ between models. Embedder uses a Digilent device only if it has a logic analyzer, and checks which other instruments the connected device provides. Examples on this page use an Analog Discovery 3 (AD3).

Prepare

  1. Connect the device with a data-capable USB cable.
  2. Close the WaveForms application and any other program using the device.
  3. Ask Embedder to check the device. The first time, approve the setup prompts:
    • Install Python 3? if Python is missing.
    • Install managed Digilent WaveForms runtime? if WaveForms isn’t installed. The prompt shows where Embedder will install it. Embedder can install the runtime on macOS, Linux (x64 and Arm64), and Windows x64.
    • Create Embedder Python environment? and the Python package install that follows.
  4. Ask Embedder to list the selected device’s digital inputs, analog inputs, waveform outputs, and supplies before you use them.
You don’t need to install WaveForms yourself. On macOS, Embedder uses an existing WaveForms installation in /Applications when it finds one. If Python 3 is already installed and a Digilent device is connected when Embedder starts, Embedder may set up the runtime in the background, so you might not see every prompt.

Channel numbers

Embedder counts channels from 0. On the AD3, digital channels are 0 to 15. Analog input 0 is the physical Channel 1, and analog input 1 is Channel 2. When several Digilent devices are connected, give Embedder the serial number of the one to use.

Capture digital traffic

Stop a manual capture before decoding or saving it. The AD3 uses a fixed digital threshold.

Add a trigger

Without a trigger, the capture starts immediately. To start on an event, describe one of these:
In a hardware script, call la_setup_trigger() before you start the capture. Use the reported sample rate when you measure timing.

Capture from the Monitor

You can also capture digital channels from the Monitor’s Logic tab without asking Embedder.
  1. In the Monitor, select +, then select the device under On the bench. Or open Logic Analyzer under Views and choose the device from the device chip.
  2. If the toolbar shows Set up & connect or Connect, select it. Selecting Set up & connect approves setup.
  3. Select the Logic setup chip, the settings summary next to the device chip, to open the Logic analyzer setup panel.
  4. Under Channels, choose the channels. Under Acquisition, set the Sample rate, the Duration (up to 60 seconds), and, on a Digital Discovery, the Threshold. If the tab reports that the capture exceeds the analyzer’s buffer, lower the sample rate or the duration.
  5. Under Trigger, keep Immediate, or choose Edge and set the Channel and Edge. With an edge trigger, Duration becomes After trigger, the time captured after the edge.
  6. Select Single to capture once, or Run to capture repeatedly until you select Stop.
Each capture’s raw transitions open in the waveform view and in Capture history. To zoom, pan, or jump to a sample range, see Navigate the waveform. For level or external triggers, decoding, or analog inputs, ask Embedder. Disconnect, Rename device, and Rescan devices are in the ⋯ (Device actions) menu, with Forget device for a saved device that isn’t currently detected.

Decode and save

Embedder decodes Digilent captures with these built-in decoders: The SPI decoder samples on the rising clock edge, most significant bit first, with an active-low chip select. For other SPI modes, use a DSLogic or decode the raw CSV. Ask for the files you need, then inspect the signals and frames in the Logic tab:
  • Raw digital CSV, one column per channel.
  • A decoded CSV for each decoder, with data in hexadecimal.
  • A saved capture as .dwf3.json. This is Embedder’s Digilent capture format; Logic 2 can’t open it.
Exporting raw or decoded CSV sends the capture to the Logic tab. In scripts, use la_add_protocol_analyzer(), la_export_raw(), la_export_table(), and la_save_capture(). CAN decoding shows frames. To interpret application-level signals with your project’s database, use CAN Monitor.

Measure analog signals

Analog recordings start at once; there is no analog trigger. They appear in the Monitor’s Oscilloscope tab. Digital captures appear in Logic, and supply readings in Power. In a saved script:
range_volts=5.0 asks for a window of at least ±5 V; Embedder picks the smallest device range that covers it. Check the returned rate and duration before you calculate timing.

Generate a stimulus

Describe the output, waveform, frequency, amplitude, offset, and what happens when the test ends:
Support for each waveform depends on the device. Amplitude is the peak value, so a 1 V amplitude swings 2 V peak to peak before offset. Amplitude can be up to 5 V and offset from -5 V to 5 V. In a script, la_wavegen_setup() configures an output, and la_wavegen_start() and la_wavegen_stop() control it. la_wavegen_dc() starts a DC level, and la_wavegen_pulse() starts a square wave with the duty cycle you choose, each in one call. Put the stimulus, capture, and cleanup in one script. State the permitted voltage range and the final output state, and stop the output even if the capture fails.

Control a supply

On a device with adjustable supplies, specify the rail and voltage. The AD3 has a positive rail from 0 to +5 V and a negative rail from 0 to -5 V.
Before enabling a supply or waveform output, check voltage, polarity, grounding, current demand, and any other power source connected to the target.
Ask for an explicit shutdown state. You can read the supply status once or monitor it for a set time:
The status includes each rail’s voltage and current and the device’s USB voltage and current. In a script, la_psu_setup() sets the rails and the master enable, la_psu_status() reads them once, and la_psu_monitor() records them to the Power tab for a set time. Pass 0 for a rail to turn it off. These readings come from the device’s own supply monitor. For an inline current measurement of the target, use a PPK2 or Joulescope.

Troubleshoot

  • “No Digilent device detected”: check the USB cable and port, then connect an Analog Discovery or Digital Discovery and retry. On Linux, Embedder finds the device with lsusb; install your distribution’s usbutils package if that command is missing.
  • “Managed Digilent WaveForms runtime is not available for host …”: Embedder can’t install the runtime on this operating system or processor. Install WaveForms from Digilent, then ask Embedder to check the device again.
  • “Connected Digilent devices do not expose a logic-analyzer instrument”: Embedder can’t use this model. Connect a device with digital inputs.
  • Instrument missing: the selected model doesn’t provide that instrument, such as analog inputs on a Digital Discovery.
  • Device busy: close WaveForms or another script using the device.
  • Clipped analog signal: increase range_volts or reduce the stimulus amplitude.
  • Wrong channel: compare script indexes, which start at 0, with the physical labels.
  • Analog recording isn’t in the Logic tab: this is expected. Digilent analog recordings open in Oscilloscope, and supply readings in Power.
See Logic analyzer to compare instruments.
Last modified on November 13, 2026