It ought to be possible to have multiple devices on one SPI bus, provided you don't try to access more than one at a time (e.g. by having async display updates running and then reading your encoders); that is kind of the point of SPI having a /CS...
Solved.. I din't notice, Adafruit_MCP23X17 has a specific function, which reads all 16 pins:
uint16_t readGPIOAB();
I know this library, and I'd like to use it, because it seems very simple and essential but I've not been able to configure SPI1...
I googled "github MCP23S17 Arduino" and found this library, which seems to have what you want. I have used some of Rob's libraries and they work well.
https://github.com/RobTillaart/MCP23S17
Hi all, in my application I would connect n.6 MCP23S17 to my T4.1, with SPI1 bus, using these pins:
CS1: 38
MISO1: 39
MOSI1: 26
SCK1: 27
The purpose is reading Encoders and pushbutton; here is a sample of my schematics:
My requirement are: 1)...