Connecting U4 to U5 via SPI


how do i connect u4 to u5 using spi
To wire U4 and U5 for SPI communication, you need to match the corresponding SPI signals between the two devices. For example, the typical SPI signals you must connect are:

Table


SPI SignalU4 Pin (Function)U5 Suggested Pin
SCLKSCLK (typically pin 4 on U4)GPIO8/D8 (Pin 9 is recommended for the SPI clock)
MOSIMOSI/SDA (typically pin 6 on U4)GPIO10/D10 (Pin 11 is a good choice for MOSI)
MISOMISO (typically pin 7 on U4)GPIO9/D9 (Pin 10 works well for MISO)
CSCS/SCL (typically pin 8 on U4, used as chip select)Any available GPIO, for example GPIO? (assign a free pin for CS)
In addition, make sure to connect the grounds (GND) of both U4 and U5 together to ensure a common reference.
Important:
  • Verify the exact pin numbers on each device’s datasheet.
  • Ensure your chosen CS line on U5 is configured as the SPI chip select in your firmware.
  • Check that the voltage levels on both devices are compatible or use level shifters if required.
These connections will let U5 (the microcontroller) use its SPI interface to communicate with U4 (the sensor).
Assign chip select
Verify voltage compatibility
Enhance signal integrity

Positive Plum Universal Remote 045c