Hi, A 16:1 fanout would raise alarm bells in most hardware engineers minds I think. Remember the SCLK and MOSI lines would each be driving 16 devices in parallel, and each peripheral MISO line would have top drive 15 of it's tristated companions. I suspect a few buffers would be required.
If the peripherals have input data to supply to the controller then the 16:1 would raise my software concerns as well. Polling 16 devices to get input from just one or two would be inefficient. An 8:1 chip select mux might be a more practical limit. Some SPI controllers even support this style of operation. I think it was the Atmel SAMA5D3 series gave you the choice of three separate chip selects for three devices, or three lines working in concert to drive an external 8:1 mux for eight. No idea if the RPI controllers would do this, it would be deep is the SoC manual, but I doubt it. On Sun, Aug 16 at 01:43, Terry Coles wrote: > On Sunday, 16 August 2020 12:46:53 BST Ralph Corderoy wrote: ... > > Could you demux outputs from the Pi to give more chip-selects lines, > > e.g. four GPIOs could drive one of 2???=16 CS lines. > > https://en.wikipedia.org/wiki/Demux#Digital_demultiplexers > > > It's the demux's outputs which fan off as CS to each SPI device. > > Meanwhile, they all get SCLK, MOSI, RST and D/C straight from the Pi. > > You could leave the software thinking there was only one SPI device and > > drive the demuxer yourself just before each run of SPI-writing for a > > device. If they were different speed devices then you'd have to change > > the bus speed too. > > That's a very good idea (now why did I not think of that? :-) ). I'll look > into it. We can easily do that on a piece of Veroboard and it has the > advantage that the standard library will still work; I just have to assert > the > extra GPIO pin to toggelt the right CS pin. > > > No idea if it would work. This is a hardware problem. :-) > > I'm pretty sure it would. I'll pass it on to my co-volunteer who asked me to > look into this. He was a hardware engineer before he became a company > director. Hey you can be a company director and still keep your day job if you want. I kept up my software work although I did back pedal on the hardware. -- Bob Dunlop -- Next meeting: Online, Jitsi, Tuesday, 2020-09-01 20:00 Check to whom you are replying Meetings, mailing list, IRC, ... http://dorset.lug.org.uk New thread, don't hijack: mailto:dorset@mailman.lug.org.uk