SPI modes between MSP430 and a shift register (74HC166, a PISO)

Thread Starter

MikeHutao

Joined Aug 2, 2024
11
Can someone please explain it to me how does the 4 different modes of SPI be configured ? when to use each mode and its consideration ? i dont really understand about this mode.

In my project, i just meant to read the value from the shift register using MISO. im planning not to use the MOSI since i dont have to send any data. can someone explain it to me if this will help me pick the mode ?
 

Papabravo

Joined Feb 24, 2006
22,058
The modes of the SPI peripheral are configured by selecting different values of the configuration bits in a configuration register. You pick one of the four modes according to the requirements of the peripheral device. It may not matter in a practical sense which mode you pick as long as you can achieve consistent results. Consult a datasheet for the 74HC166 to see which configurations might work for you.
 

Thread Starter

MikeHutao

Joined Aug 2, 2024
11
The modes of the SPI peripheral are configured by selecting different values of the configuration bits in a configuration register. You pick one of the four modes according to the requirements of the peripheral device. It may not matter in a practical sense which mode you pick as long as you can achieve consistent results. Which shift register are you planning to use?
74HC4040
 

Papabravo

Joined Feb 24, 2006
22,058
OH YEAH I WAS MISTAKEN. it is indeed 74HC166
So, check the datasheet. It is probably the case that you want to shift on one edge and read the data on the following edge. Alternatively, you might want to read the data and then shift. I can't remember if the high order bit of the shift register is available externally.
 
Top