Programmable signal generator

From sigrok
Jump to navigation Jump to search
*** DRAFT ***

This page documents the config keys are various other info needed to write a libsigrok frontend for controlling programmable signal generators (or arbitrary waveform generators).

TODO

  • Some way to cleanly implement frequency counter device in same driver...


Notes

It is common for different signal modes (sine, square, pulse, ...) have different limits.


Config keys

A libsigrok driver for a programmable signal generator implements all or some subset of the following config keys.

SR_CONF_SIGNAL_GENERATOR

Denotes a device that provides programmable signal output via one or more output channels, typically with frequency, amplitude, offset, and phase set via the sigrok driver.

SR_CONF_ENABLED

  • boolean
  • get: Actual state of output
  • set: Turn output on or off
  • list: NA

SR_CONF_OUTPUT_FREQUENCY

  • double, representing frequency of output signal
  • get: The current output frequency.
  • set: Set the target output frequency.
  • list: Supported frequency range as (low, high, step). NOTE! This can change if channel mode is changed.

SR_CONF_AMPLITUDE

  • double, representing output signal amplitude (Vpp)
  • get: The current output signal amplitude.
  • set: Set the output signal amplitude.
  • list: Supported amplitude range as (low, high, step).

SR_CONF_OFFSET

  • double, representing output signal DC offset (Vdc)
  • get: The current output signal offset.
  • set: Set the output signal offset.
  • list: Supported offset range as (low, high, step).

SR_CONF_PHASE (NEW)

  • double, representing output signal phase (degrees)
  • get: The current output signal phase.
  • set: Set the output signal phase.
  • list: Supported phase range as (low, high, step).