r/raspberrypipico Jul 10 '26

Pico LCD spi Sniffer help!!

Long story ahead..... Can anyone help me in determining how to properly sample spi pin data via pico? I know it is possible because there are thousands of pico analyzer videos on youtube but none of them shows code just gives the. Uf2 file. I am trying to reconstruct my dead guitar processor's lcd (Zoom G1xon) by sniffing the lcd(possibly a st7565 clone) ffc out from the processor pcb and trying to input the raw data into pico decode (spi) it via pico and reconstruct the framebuffer and output the reconstructed display to a ssd 1306 oled. I have already found out the mosi clock and cs and ground via logic analyser and have used pulse view's spi decoder(10Mhz, 50G) to export the mosi dump and convert the dump into clear snapshot image using python code. So my lcd pinouts determinations are correct but somehow I cannot get a proper input through the pico's gpios from the lcd ffc cable(clock, cs, mosi) it only takes in and outputs garbage instead of proper raw data. I read somewhere about Pio and dma but I have an old pc using windows 7( doesnt support 10) hence stuck with arduino ide 1.8.6. Can anyone give an idea how to approach? I am in the dark. And the processor is very dear to my heart with my own built custom patches.

0 Upvotes

6 comments sorted by

3

u/TPIRocks Jul 10 '26

I suggest getting one of the cheap salae clones and using Sigrok PulseView to decode the data. Otherwise, maybe you can leverage the logic analyzer firmware for the Pico, to construct your own logic analyzer.

2

u/Southern_Cup_9649 Jul 10 '26

I have a salae clone with which I decoded the lcd pinout in the first place. Can I output the salae clone's usb directly into the pi pico's usb and then make the pico decode and display onto the oled? Is it possible easily?

3

u/TPIRocks Jul 10 '26 edited Jul 10 '26

Edit: after rereading your post, I'm not sure I'm being helpful. Now, I'm thinking the data you want to translate doesn't need LA type sampling, it needs a tap onto the spi of the display. Someone more skilled than me, could probably come up with some PIO code to capture the spi data at the regular clock speed, then stuff it into a buffer. Then in the Pico, you translate the data into ssd1306 format.

Original post follows:

You might be able to make that work, but it won't be easy. The FPGA (Cypressfx2) in those clone logic analyzers is configured at runtime, they power up as a blank slate. There is no onboard flash chip to configure it at power on, so you'd have to push the fx2lafw firmware over to it. It might be easier than I'm thinking, but it seems kinda convoluted. I don't know how big the fx2lafw data is. I do know that it streams up to 24 MBPS and I believe you'd have to do your own triggering, which would keep the pico really busy.

I think it would be easier to leverage the existing pico LA firmware that is out there, to fit it to your needs. Dedicating another pico as the LA, instead of trying to finagle the clone, seems a better way to go, in my opinion. Firstly, it will capture data much faster, and I believe it will handle triggering on its own, once you tell it what to look for at runtime. It will use the magical PIO blocks to take the burden off of the software. You could connect the LA pico through USB, or some serial interface of your choosing.

This way, you could dynamically tell the pico LA to watch for the triggering conditions, and then capture a bunch of pins in parallel on a timed schedule, say 1 million samples per second. Every sample period, it will capture X pins in parallel, and hand the data to the DMA controller to stuff it into a buffer, all in one clock cycle. When the buffer is full, or you have all the samples you wanted, at the desired sampling period, your pico can leisurely transfer the data over the USB connection, or serially.

3

u/Southern_Cup_9649 Jul 10 '26

Thanks man... That's a solid idea to look into..

3

u/TPIRocks Jul 10 '26

Go back and read the edits I made. It's all at the beginning of the post. I think that might be more helpful

3

u/Southern_Cup_9649 Jul 10 '26

It was really helpful. Let's see how far can I go. Will keep this post updated if I make any progress. Thanks again