7 years, 3 months ago.

Is it possible to connect 3 SPI devices to the same mbed at once?


I'm trying to connect three SPI devices at once on the same MBED and I was wondering if this is possible?

Thanks, James

Hi James,

i know this is an old question but i am trying to do the same thing and i wanted to ask if you have any code example that you used to connect and save data to the three spi devices.

posted by Elvi Fiscali 30 Jan 2016

2 Answers

7 years, 3 months ago.


There are two SPI interfaces on the mbed but you can connect multiple devices to each one. For example you could connect three SPI devices as shown below.


Pins 5,6 & 7 are the one of the mbed's SPI interfaces and are shared with all 3 devices. Each SPI device has it's own CS (chip select) line (8, 9 & 10) which you would set low to select the device. You can see an example of a single SPI device being selected and deselected on the SPI handbook page.

You might also choose to connect one of your SPI devices to one SPI interface and 2 to the other.


Accepted Answer
7 years, 3 months ago.

Yes this is fine, just use different chip select lines for each device.