Write data to registers of an SPI slave device
Simulink Support Package for Raspberry Pi Hardware
The SPI Register Write block writes the block input data to specified register address. To open the pin map of the Raspberry Pi board, click the View pin map button.
Port_1— Input port to accept data
The input port to accept data to write the data to the SPI slave register.
Board— SPI module used for communication
Select the specific board that you are using. Changing the board updates the pin choices that you get.
Slave select pin— Pin connected to the SPI slave device
Select the pin number on the Raspberry Pi board to which the SPI slave device is connected.
Mode (Clock polarity and phase)— Mode of SPI communication
Select the SPI communication mode.
Register address— Register address to write the data
Enter the slave register address to write the data.