pico-coder / sigrok-pico

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

regarding channel numbering. #34

Open hanetzer opened 1 year ago

hanetzer commented 1 year ago

You mention 21 channels, D2-D22, and as being the markings on the pcb. However, my picos and the upstream documentation have the gpio pins numbered as GPn, not Dn. I assume thats a 1:1 match?

pico-coder commented 1 year ago

The numbering is per the PICO board signal names, not the RP2040 pin names (though I haven't looked at the RP2040 pin names and maybe they match too...) https://datasheets.raspberrypi.com/pico/Pico-R3-A4-Pinout.pdf Thus D2-D22 are GP2 to GP22, and A0-A3 are ADC0-ADC3. I do need to clarify that in the AnalyzerDetails.md. Also, I'm in the process of supporting more descriptive channel names.

hanetzer commented 1 year ago

Nice, that's what I figured but always good to verify. Unfortunately the pico can't work fast enough as a logic analyzer for my purposes, but I'm gonna try to adapt the clocked_input example from pico-examples to sample the lpc clock at 33.3Mhz, do some light parsing to filter out empty cycles, and forward them over usb (lpc is 33.3Mhz and about a byte of data each cycle, which is too fast for the 12Mbps the pico's usb is capable of)

pico-coder commented 1 year ago

This implementation supports run length encoding (RLE) over the wire so that duplicate samples are not sent. So there is a chance it might work, though at 33Msps the Pico cpu may not be able to process it fast enough.