sigrok/pulseview support for DSO112A

Color oscilloscope with touch panel

sigrok/pulseview support for DSO112A

Postby mwm » Sat Jul 23, 2016 7:27 pm

I've finished - at least until the firmware issues get dealt with, see the thread on serial interface docs at viewtopic.php?f=17&t=844 for adding a driver for the DSO112A to libsigrok. I'm posting the source for the sigrok project folks to review while I wait on those firmware issues, so thought I'd mention it here in case someone felt like giving it a try.

For now, it works fine with a Volts/Div setting of 1 on my DSO112A. It may not work that way on other instances, and it certainly won't work at different V/Div settings. It requires the latest firmware (113-11201-200) as is. I have no idea if it will work on a DSO112 with any firmware. I'd be interested in answers to those questions if someone tries it out. However, given those issues, I'm not going to provide a compiled version. You'll need to install the binaries for your OS if available, then build this from source and install it to replace libsigrok. If you would really like to test it but aren't up to the build, ask here and I'll see what I can do.

Sources at https://github.com/mwm/libsigrok
mwm
 
Posts: 44
Joined: Fri Jun 24, 2016 2:35 pm

Re: sigrok/pulseview support for DSO112A

Postby jye1 » Mon Jul 25, 2016 1:29 am

Your work is much appreciated. Can you post a screen shot of pulseview on DSO112A? Thank you in advance. I don't know much about sigrok/pulseview.
jye1
 
Posts: 1222
Joined: Wed Feb 20, 2013 4:58 pm

Re: sigrok/pulseview support for DSO112A

Postby mwm » Mon Jul 25, 2016 4:32 am

I'm not much of a pulseview user' I tend to use the sigrok-cli command, and just run captures to analyze later. So I don't have one handy. And it really won't show anything about the DSO112A except saying "JYETech DOS112A" in the "Device" field. I'll see what I can do, though.
mwm
 
Posts: 44
Joined: Fri Jun 24, 2016 2:35 pm

Re: sigrok/pulseview support for DSO112A

Postby mwm » Tue Jul 26, 2016 8:58 pm

I've incorporate the vpos & vsen info from jyetech on the other thread (thanks!). It doesn't use the test firmware; that's going to take a bit more work, and possibly some sleep. In trying to get pulseview working, I also made it as easy to install this build on a Mac as it is to install the standard build. Follow the sigrok instructions at http://sigrok.org/wiki/Mac_OS_X#Building_using_Homebrew, except where it says to issue the command
Code: Select all
brew tap rene-dev/sigrok
issue the command
Code: Select all
brew tap mwm/sigrok
instead.

Here's the image of Pulseview talking to a dso112a that was requested:
PulseView.png

It shows the settings that Pulsview supports for it (should be more in the future). The capture data is garbage. I'm not sure why, as it works fine in sigrok-cli, which are different front ends to the library that the driver is in. Clearly, something is ticking a bug that shows up with pulseview but not sigrok-cli. Among other issues that need work.

sigrok-cli is a bit more flexible than Pulseview. Here's what it thinks a dso-112a looks like:
Code: Select all
~/src/external/libsigrok/src/hardware/jyetech-dso112a $ sigrok-cli -d jyetech-dso112a:conn=/dev/ttyU0 --show
Driver functions:
    Oscilloscope
Scan options:
    conn
jyetech-dso112a - JYETech DSO112A with 1 channel: Int
Supported configuration options:
    continuous: on, off
    limit_frames: 0 (current)
    limit_samples: 0 (current)
    limit_time: 0 (current)
    timebase - supported values:
      1 us
      2 us
      5 us
      10 us
      20 us
      50 us
      100 us
      200 us (current)
      500 us
      1 ms
      2 ms
      5 ms
      10 ms
      20 ms
      50 ms
      100 ms
      200 ms
      500 ms
      1 s
      2 s
      5 s
      10 s
      20 s
      50 s
    vdiv - supported values:
      2mV
      5mV
      10mV
      20mV
      50mV
      100mV
      200mV
      500mV
      1V
      2V
      5V
      10V (current)
      20V
    buffersize:  - supported values:
      512 (current)
      1024
    coupling: DC, AC (current), GND
    triggersource: INT (current), EXT
    triggerslope: Neg (current), Pos
    triggerlevel: 0.000000
    samplerate
    horiz_triggerpos: 0.250000
~/src/external/libsigrok/src/hardware/jyetech-dso112a $

In this you can see that sigrok-cli lets me limit a sample by time and frames as well as samples. And it indicates that the samplerate is available, though for some reason isn't showing it:
Code: Select all
~/src/external/libsigrok/src/hardware/jyetech-dso112a $ sigrok-cli -d jyetech-dso112a:conn=/dev/ttyU0 --get samplerate
125000

FWIW, the horizontal VPOS setting is a lie. Sigrok expect that it's a continuous variable, not a list, so doesn't handle that properly. I'm still waiting for the sigrok folks to get back to me about that.

Just for grins, I ran these commands:
Code: Select all
bhuda% sigrok-cli -d jyetech-dso112a:conn=/dev/ttyU0 --time 3000 -o /tmp/staircase.sr
bhuda% pulseview -i /tmp/staircase.sr

And here's what that looks like:
ramp.png

As you can see, there's a hiccup every 4ms (244Hz). Checking the values for the capture and doing a bit of math:
Code: Select all
bhuda% math (sigrok-cli -d jyetech-dso112a:conn=/dev/ttyU0 --get samplerate) / (sigrok-cli -d jyetech-dso112a:conn=/dev/ttyU0 --get buffersize)
244

that matches the frequency of frame captures, so that's something else to look into.
mwm
 
Posts: 44
Joined: Fri Jun 24, 2016 2:35 pm

Re: sigrok/pulseview support for DSO112A

Postby mwm » Wed Jul 27, 2016 7:38 pm

This has been updated, and current builds now require the test firmware. Build state available at https://github.com/mwm/libsigrok/tree/d ... ch-dso112a.
mwm
 
Posts: 44
Joined: Fri Jun 24, 2016 2:35 pm


Return to DSO 112 & 112A (Coral)

Who is online

Users browsing this forum: No registered users and 1 guest