This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

communicating MSP430 with SPI

Other Parts Discussed in Thread: MSP430F5438A, TRF7970A

Hi,

I am trying to communicate a MSP430F23 device to an accelerometer (ADIS16209) using the SPI. I've already got the code, but how can I connect the pins so that they can communicate? Which MSP430's pin do I have to connect to SS or to CLK?

Thanks,

Diego

  • Dear Diego,

    Yo need to take a look at USART pages of the MSP430 datasheet. When working with SPI port, each manufacturer calls the pins in a different way but they are always the same.

    The idea you need to understand is how SPI works:

    1. In SPI comm. there is a master (in your circuit the MSP430) and an slave (in your circuit the acc. )

    2. Clock is provided by the master, and when the masters looks for the slave replies it sends 0xFF bytes in order to only put the clock signal.

    3. Then they are 4 pins: master output, slave inpunt, clock and chip select. As I've told you each manufacturer calls this pins in a different way, but don't worry about the name, you need to understand the sense of these pins.

    4. The connection:

    • clock signal in master is branched to clock signal in slave
    • chip select in master is branched to chip select in slave
    • master input pin in master is branched to slave output pin in slave
    • master output pin in master is branched to slave input pin in slave

    I've just written a guide (in spanish) in my blog about how to use the MSP430, I'd like to invite you to learn there and please feel free to comment anythig or to contact me if you have any questions:

    ---

    www.javierlongares.com

    www.javierlongares.com/arte-en-8-bits

  • Dear all,

    We are trying to implement SPI in MSP430F5438A. (Implementing SPI in Atmega128 was simple) . here we receive Slave data before we command from master device. and we want to implement 4-wire SPI. STE (En) signal in msp430f5438A goes high even if we make it low.

    could any one help  us in this matter.

    Thanks

    CK

  • Hi!!

    I am using trf7970a evm to trest nfc p2p.
    the firmware is in Parallel(direct mode) but i want to change it to SPI mode , however it is written in evm mode that:

    ""When the SPI interface is selected, the unused I/O_2, I/O_1, and I/O_0 pins must be hard-wired as shown
    in Table 5-9. At power up, the TRF7970A samples the status of these three pins and then enters one of
    the possible SPI modes.""
    in TRF7970A Evaluation Module (EVM) User's Guide 

     but my question is whether that is also possible in any other way, such as either by sending appropriate commands or whatever ?? 

    Kind Regards 

     

**Attention** This is a public forum