Sigrok protocol decoder

Last week I was carrying on about how good the Sigrok/Pulseview project was these days.

Since then I’ve received my PCBs and had a go at creating a very simple protocol decoder for the ADC data signals. The biggest problem I had was trying to find a simple example to start with, as all the PDs that come with Pulseview have loads of options that result in lots of code.

So I’ll post this here in case anyone wants to have a go themselves. This is pretty much a bare minimum protocol decoder, following the HOW-TO page and APIs:
https://sigrok.org/wiki/Protocol_decoder_HOWTO

The code for the PD (all simple python), sample capture data that you can try it on, a script to plot the decoded/exported data and pics are on github at:

Screen capture of the result. This is the 4 data-lines, clk and drdy signal from the AD7779 ADC. The actual bit meanings are unimportant unless you wanted to use this on the same ADC, but rather the code for the decoder may give you something to start with for your own application.

Beyond just looking at the output in Pulseview, you can right click on a decoder and export everything. I took that and plotted it, plotting script also available at that github link.

1 Like