I like to connect more than two SPI slaves to the Raspberry. Just want help how to configure my Raspberry Pi Zero.

  • Ah, let me see. (1) Rpi4B has 6 SPI buses (SPI0 to SPI6), all the masters. (2) Each SPI bus has 2 or 3 Chip Selects. (3) For example, SPI bus 0 has Chip selects CE0, CE1 (SPI 0,0, SPI 0,1) So SP 0 can control two SPI slave devices, such as two sensors. – tlfong01 Feb 10 at 14:56
  • This Rpi4B pinout maps shows the GPIO pins including SPI, I2C, UART, PWM, regular GPIO pins:imgur.com/lIJfwhu. – tlfong01 Feb 10 at 14:58
  • This show how to setup the SPI buses SPI0 and SPI1,and how to use loopback functions to lookback test only the SPI0 bus: (1) imgur.com/xHevA4j. You can search this forum using keywords "SPI", "loopback" etc to find more examples and program listings of SPI loopback test and how to ping and control SPI devices such as MCP3008. Please let me know if you wish to know more details and examples, such as how to connect to the SPI ADC MCP3008 etc. – tlfong01 Feb 10 at 15:05
  • If you find the all in one pinout mapping too confusing, I have compiled a table just showing the SPI pins: imgur.com/gallery/7TJcfSg. Happy SPI programming. Cheers. – tlfong01 Feb 10 at 15:10
  • 1
    How many slaves? Which SPI buses? – joan Feb 10 at 15:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.