Hello
Its possible to connect 8 spi slaves to a rpi3?
I want to connect 8 ENC28J60 Ethernet modules, i have read here https://github.com/raspberrypi/firmware ... ays/README and if i understand correctly its only possible to have 6 devices max... but im not sure if i understood correctly
- thagrol
- Posts: 4045
- Joined: Fri Jan 13, 2012 4:41 pm
- Location: Darkest Somerset, UK
- Contact: Website
Re: 8 spi slaves
I remember reading an article online somewhere (this forum?) that suggested a hacky way to achieve this. Basically, use N gpio pins (where N=number of spi devices), do not connect anything to the hardware SPI chip select lines then make all your SPI calls to CS0 but before doing so manually set the required GPIO pin.natxo wrote: ↑Tue Jul 10, 2018 9:07 amHello
Its possible to connect 8 spi slaves to a rpi3?
I want to connect 8 ENC28J60 Ethernet modules, i have read here https://github.com/raspberrypi/firmware ... ays/README and if i understand correctly its only possible to have 6 devices max... but im not sure if i understood correctly
The theory was that the hardware and SPI driver will try to address whatever device is on the CS0 line but the device you've manually selected will be the one that responds.
I guess in terms of devicetree overlays (not sure if the above predates device tree) you'd want to use the one with fewest CS lines in order to minimise lost pins.
Disclaimer: I don't use SPI and haven't tried this.
Arguing with strangers on the internet since 1993.