Electronic – MSP430 multiple slaves in SPI communication

embeddedmicrocontrollermsp430spitexas instruments

I want to make an MSP430G2553 communicate using SPI with a 7-segment display and with another microcontroller MSP430G2452.

So the MSP430G2553 would be the master and both the 7-segment display and MSP430G2452 would be slaves. The master will acquire a measurement from the slave microcontroller MSP430G2452 and then display it on the 7-segment display once per second.

I have been led to believe that it is not possible to connect the two slaves on the same SPI bus. Is this the case and if so why not?

Best Answer

A number of SPI slaves can be connected in one of two configurations:

Single Slave-Select daisy-chained

enter image description here

Here the entire SPI bus is treated as one big shift register and the master must know the order of devices in the bus chain and their respective register widths. It is also necessary to write all devices at the same time in the same bus transaction. Often the /SS line in this case is controlled by the SPI peripheral controller.

Independent Slave-Selects - wire-OR'ed MISO/MOSI

enter image description here

Here each device can be selected and written to independently at any time. Normally the /SSn lines are under software control and the master can select and access each device at any frequency and in any order.

The first configuration requires that each slave has a MISO. Some "write-only" devices such as 7 segment displays lack an MISO so can only share an SPI wired as in the second case, where such devices will not be connected to MISO.