pico-coder / sigrok-pico

Use a raspberry pi pico (rp2040) as a logic analyzer and oscilloscope with sigrok
727 stars 83 forks source link

ngscopeclient port #49

Open sslupsky opened 3 months ago

sslupsky commented 3 months ago

Have you considered porting to ngscopeclient? https://www.ngscopeclient.org

pico-coder commented 3 months ago

The limitation of many of the supported protocols is that they implement a fixed sample size from the host which the device then responds with. For a real piece of hardware with lots of on board storage that's no big deal, but the PICO only has ~200kB of useable space. And it's across a slow 12mb/s usb port. Thus I implemented a dynamic compression algorithm for digital samples to enable things like 400ksps i2c that could stream up to the memory limits of the host (GBs) rather than the the device. You could go to more standard SCPI protocol, but you'd lose that capability. Also note that ngscopeclient doesn't support windows SCPI so it would be limited to use.

If I really was going to go to another protocol, I think I'd develop some javascript code that used either WebSerial API or used a wireless pico over ethernet and then displayed on a javascript canvas. I think now that's it 2024 just about any modern machine should render that just fine, and the javascript should be able to parse out the serial stream too. Then, any time someone wants a new feature they just need to write some javascript. That eliminates lots of fussing across multi-OS build issues with all of the components that libsigrok uses.

sslupsky commented 3 months ago

Yeah, that makes sense. I pinged the guys over at the ngscopeclient side to ask if they intend to support streaming. There is an open issue about this but no indication other than it is an open issue.

There is some work going on to support an open source scope with a Thunderbolt interface. Not sure if any of that work considered streaming data or if it implements the interface in a more traditional manner.

https://github.com/EEVengers/ThunderScope

sslupsky commented 3 months ago

Looks like they use SCPI transport for the Thunderscope.

pico-coder commented 3 months ago

Yeah, the RP2040 is an amazing little device, but in many ways, it's just a little device. I've kind of had the philosophy that it's a logic analyzer and scope that you use when you don't have anything else around to do more serious debug...