JayKominek Basically set the pico up to spit data 4 bits of data out at a time, along with bit and word clocks, then snarf all of that up and process it.
Thanks that looks like an interesting piece of equipment.
JayKominek How fast are you able to write off the SD card?
In theory the pico SPI's bus in controller mode can go at 62.5 Mbps or short of 8MiB/s which would be plenty. However the pico SPI's bus in device mode can only go as fast as 11Mbps or not even 1.5MiB/s. Not that I am using that mode for the SD card, just mentioning the specs (which would apply if I hooked picos together, which I may eventually do, since the I2C which I am using now can only go about 100kiB/s)
With my SD card, accessed via DMA and not doing anything else at the same time on the pico, I can write (occasionally) up to 750kiB/s, and regularly and sustained around 500kiB/s, which is the same obtained by the author of the library I am using (considering file size too). Yes, I wired it with extremely short and as straight as possible cables (soldered, not jumpers). Not full throttle of what the ADC is able to produce (especially if I want to add time information, which I do) but perhaps adequate. In my naive code, I am just taking samples off the ADC with calls to adc_read
which is not ideal for speed but it's extremely convenient. Then passing them to the SPI bus. With that, I'm getting around 250kiB/s, sustained. As I wrote above, I should be able to double that with less naive utilization of the ADC (at least continuous mode and DMA, perhaps interrupts too).
However I don't want to spend time on this unless somebody tells me it's really needed to analyize the data and prove we need such fast reading. Programming the Pico for regular code is a joy. Programming the I/O and the more sophisticated features is an exercise in frustration. For example, it took me weeks to figure out that in device mode, the Pico cannot transmit via I2C, only receive. That is a severe limitation which should be stated in boldface in the datasheet and/or the SDK. Instead both contain documentation claiming that it works just fine! See in this comment how frustrated I was with the issue. And see https://github.com/davidedelvento/Rpi-pico-i2c-example if you care to investigate this particular issue yourself. As such, as I said above, I am not engaging in more advanced Pico programming unless they are proven (or at least speculated) necessary.
n-player I knew the Pico was slow on the IO
Well, it's a tiny board. The CPU is ok. It has just a bit above 256kiB of memory (kilobytes! You can print the content of all its memory on a small fraction of a ream of paper!!!) -- it does not have an OS: your program is the only thing that run on the thing. It does not have the SD card slot or interface: you have to solder or connect with jumper wires via a legacy bus. It's like becoming young and using the C=64 again ๐
n-player thought there might be a possibility to tweak a bit better performance if you were using an old or junk SD card.
Yes, got it and thanks, appreciated ๐
@CyberGene may you please move the last 5 posts (including this one) from this conversation into a "Raspberry Pico hw discussion"? This velocity mapping thread is already unwieldy and we need to continue discussing that topic with focus, keeping these digressions separate. Thanks!