SLAAEL9 October 2024 MSPM0C1104 , MSPM0L1306
This subsystem demonstrates how to use MSPM0 to achieve IO expander function through the communication command from serial peripheral interface (SPI), I2C, or universal asynchronous receiver-transmitter (UART) by the host. This expansion is helpful when the number of GPIOs on the host is inadequate. In addition to supporting control of the GPIO output, the subsystem can also read back the GPIO status through SPI, I2C, or UART. Figure 1-1 shows the basic architecture of the subsystem and the modules which are used in this case.
Table 1-2 has links to the example code. In this demonstration, the IO control number is limited to eight. However, users can do further IO expansion by referring to this demonstration.
Table 2-1 shows the required peripherals and function modules in this application.
Subblock Functionality | Peripheral Use | Notes |
---|---|---|
Serial Peripheral Interface | (1 ×) SPI | Called SPI_0_INST in code |
I2C interface | (1 ×) I2C | Called I2C0_INST in code |
UART interface | (1 ×) UART | Called UART_0_INST in code |
GPIO | (8 ×) GPIO | Called GPIO_GRP_0 in code |