Oscilloscopes

From sigrok
Jump to navigation Jump to search

This page documents the config keys are various other info needed to write a libsigrok frontend for controlling oscilloscopes.

Frame-based

Generally oscilloscopes work by triggering on either the signal under measurement, or some external trigger. The device then measures as much as its internal buffer can hold. When the buffer is full, the device stops measurement and sends its buffer over to the libsigrok driver. This transfer represents a frame's worth of data. The driver converts this data to the libsigrok internal analog format and sends it out to the frontend like this:

Packet type Payload
SR_DF_FRAME_BEGIN
SR_DF_ANALOG analog data
SR_DF_ANALOG...
SR_DF_FRAME_END

The oscilloscope then restarts acquisition, sometimes after prodding by the driver. The data received from an oscilloscope is thus not contiguous from one frame to the next: in between there is a period where no measurements are done by the device.

Streaming

Some devices can act as continuously streaming oscilloscopes, with no framing involved. Notably FX2-based devices with an analog frontend, such as the Nexus-Computing OsciPrime, work this way.


Config keys

A libsigrok driver for an oscilloscope implements all or some subset of the following config keys.

SR_CONF_OSCILLOSCOPE

Denotes a device that can act as an oscilloscope, i.e. measure voltage over time on one or more analog channels, and send those measurements out to the frontend as analog values.