I am using a few Picos (connected together via I2C -- but I will switch soon to SPI) as a single USB peripheral connected to a computer and they are working ok. The computer obviously sees only one of the Picos, the one which coordinates with the others on what they need to do.
In one operating mode (just for debugging/calibrating), I would like to capture all the data from the Pico's ADC running at full throttle, which is 500kSample/s at 12bit. With some overhead I have in the protocol, it turns out I'd need several MB/s (note the capital B for bytes, not bits). Unfortunately, the Pico supports at most 12 Mb/s (lowercase b for bits), which is about an order of magnitude less than I need. For everything else I need to do, this bandwidth is adequate, it's just in this debugging/calibrating mode that I have this problem, so I'm asking for advice.
Here are possible solutions I thought:
- Reduce the protocol overhead, reduce the bit depth to 8-bit (no big loss since it's about 9ENOB anyway) and add compression. On paper it should be enough, but it is a close call. Potentially lots of work to change the protocol and implement compression, and it may be a dead end, e.g. if the CPU can't keep up compressing data at that throughput, and/or if the compression rate is inadequate. It has the advantage that I could use the same connection I am using for the regular transmission, and no other hardware is needed (two pluses, but not really requirements)
- Use the SPI interface for this purpose, since at 62.5 Mbps it should have enough bandwidth. I will need an external board to connect to the computer. Not a big deal if such a board exists, is inexpensive, support the desired throughput to the computer, and works out of the box. Does it? I have seen some, but I have not found easy information about them.
- Store the data and transfer it (later) at available speed. Fine for my needs and easy-peasy, if it weren't that the Pico has only 264kB of memory, and I'd need at least an order of magnitude more, perhaps two. Is there any memory module that is compatible with the Pico, use a fast-enough interface (hence no I2C, which I believe is too slow on the Pico for this throughput) and not too expensive? I haven't seen any, but perhaps I have not searched the right way.
- Use a Zero W or a Pi 3+ or a Pi 4 B which can act as either of the previous two and do much more, e.g. freeing the main Pico from having to be the USB peripheral (Pi 3+ cannot do that but the 4 and the Zero can). Nice solution, a bit expensive (besides the Zero if found at list price) and hard to achieve now since all of these boards are out of stock, most not even available for backorder, and can be found only at considerable price gouging.
Any other option that I missed? Other ideas or suggestions?