Thundercat
Well-known member
Hi all, I've got a MIDI fader/pot box I'm building that will have a bunch of buttons, faders, pots, as well as 9 LCDs. 8 will be small "scribble strips" and one larger LCD to tie it all together. MCU is Teensy 4.1
With such a large project I'm using two SPI port expanders (MCP23S17) to save on precious MCU pins. The MCP23S17s will handle a bunch of buttons, and LCDs. I'm also using different hardware addresses for each MCP23S17, but I'm not sure this matters with SPI. Seems a bit complex to implement but maybe it's easy.
Here's the relevant proposed schematic detail:
I'm just wondering if I'm implementing this correctly - the two port MCP23S17s will each have their own dedicated Teensy pin for CS lines (CS_DPE1/2). Then the 9 different LCD screens will have each their own pin from the second MCP23S17 (CS0-7, CS_MAIN_LCD).
Will this cause conflicts on the SPI bus? My understanding is the CS lines are what determine which device is communicated with, so I should be able pull a CS line low, send a command, and pull it high again, per device (right?). Also is it a bad idea to use the port expanders which use CS lines to control other CS lines? Are the pull-ups necessary? Found some info on the net that says yes they are needed.
This unit maxes out at 10MHz, and is this an issue with LCDs?
Finally, if anyone has experience with the MCP23S17, how should I wire/configure the interrupts? Are they necessary?
I've been over the data sheets, but understanding the technical details is a bit overwhelming to me at the moment.
Thank you for any insights and suggestions. I am so deeply grateful to all of you for your brilliance, but beyond that, for your compassion. This is one of the best technical boards on the internet because everyone is so kind to each other.
Thank you again,
Mike
With such a large project I'm using two SPI port expanders (MCP23S17) to save on precious MCU pins. The MCP23S17s will handle a bunch of buttons, and LCDs. I'm also using different hardware addresses for each MCP23S17, but I'm not sure this matters with SPI. Seems a bit complex to implement but maybe it's easy.
Here's the relevant proposed schematic detail:
I'm just wondering if I'm implementing this correctly - the two port MCP23S17s will each have their own dedicated Teensy pin for CS lines (CS_DPE1/2). Then the 9 different LCD screens will have each their own pin from the second MCP23S17 (CS0-7, CS_MAIN_LCD).
Will this cause conflicts on the SPI bus? My understanding is the CS lines are what determine which device is communicated with, so I should be able pull a CS line low, send a command, and pull it high again, per device (right?). Also is it a bad idea to use the port expanders which use CS lines to control other CS lines? Are the pull-ups necessary? Found some info on the net that says yes they are needed.
This unit maxes out at 10MHz, and is this an issue with LCDs?
Finally, if anyone has experience with the MCP23S17, how should I wire/configure the interrupts? Are they necessary?
I've been over the data sheets, but understanding the technical details is a bit overwhelming to me at the moment.
Thank you for any insights and suggestions. I am so deeply grateful to all of you for your brilliance, but beyond that, for your compassion. This is one of the best technical boards on the internet because everyone is so kind to each other.
Thank you again,
Mike