Parts in this Question:
MCU P/N MC9S12DG256CPVE
I/O Expander P/N MCP23S17-E/ML
New to using I/O expanders. When connecting I/O expanders via SPI I believe you need 4 pins:
All I/O Expanders can connect to a common SCK, MISO, and MOSI pin. Meaning only 1 each of these pins are needed even if you had say 6 I/O expanders.
Each I/O expander must have its own dedicated SS pin on the MCU.
-
Am I interpreting the above correctly?
-
When reading the MCU data sheet. Section 2.3 calls out generic functionality of each pin. For example, section 2.3.21 says, “PH7 is a general-purpose input or output pin. It can be configured to generate an interrupt causing the MCU to exit STOP or WAIT mode. It can be configured as slave select pin SS of the Serial Peripheral Interface 2 (SPI2).” Are all pins limited to the description called out in the data sheet, or if it says general purpose can I say use other pins as SS pins that don’t call it out in the description? Such as 2.3.19, “PE1 is a general-purpose input pin and the maskable interrupt request input that provides a means of applying asynchronous interrupt requests. This will wake up the MCU from STOP or WAIT mode.”