I am currently building a Multichannel analyzer featuring a Pi3. A requirement is very fast ADC acquisition. SPI and I2C are all too slow i.e. millisecond sample times. It seems the only converters that are fast enough (and 12-16 bit) are parallel data transfer. The Pi i/o seems to scatter its data bits randomly over its ports I can't seem to find a contiguous byte much less word. How can one use a "data bus" with the Pi, not using bus expansion shift registers (just another way of saying serial port) I need a minimum of 8 bits for a 2 byte read. Or have I hit a dead end? Thank You Todd
Todd, I've faced a similar issue, for ultrasound signal acquisition. Basically, you may want to explore the way the GPIOs of the Pi are mapped to its memory - but once it's done you just have to reorganize the bits and reconstruct your signal.
I would recommend this article as it describes quite well the way parallel ADCs are managed and mapped to memory, resulting in a 10Msps+ acquisition. And for the fun of it, you can interleave two ADCs, clocked by the Pi, and get up to 20Msps+.
Todd, you possibly should back up and rethink the problem. I have worked on a series of data collection systems that have looked at the spectra from NaI(Tl) and BGO. The resolution of these detectors is such that you are kidding yourself trying to look at a higher resolution than 8 bits. Our systems accumulates the data from the detector in a remote memory (like the internal memory in a microcontroller) and only transmits the data block serially once a second. That would be 256 channels with 16 bit wide data. Even if you could manage count rates of 1 million counts per second, unless they were all in a few channels (causing overflow of the 16 bit data) you could transmit your entire spectrum with only 4096 bits of data per second. That would be pretty simple for any Pi, or even any Arduino for that matter. If the update rate is not high enough, you could probably get away with sending the samples every quarter second. It complicates the hardware a bit, but if you are good enough to design an A/D converter and signal conditioning circuits that can handle a million counts a second plus solve the nonlinearity issues of the detectors at such a high count rate the addition of a microcontroller would be trivial.