Ok i am using msp430 micro controller and a temp sensor, and i am trying to understand how spi works and how to program it.
Now from what i understand is this:
1.MOSI - Master (temp sensor) sends data(temperature) to slave (mirco controller)
2.Setting the clock phase to 1 or 0 determines if the data is written or read on the falling edge or the rising edge of the clock.
3. CS(Active Low). When pulled low the data will start to send.
What I am trying to understand is:
1.Lets say my temp is 10(Binary) and i want to send that to my micro controller. And my SPI is configured to write on the rising edge of the clock and read on the falling edge of the clock. Will the MOSI go high when the first rising edge of the clock pulse arrives, then go low as soon as the 2nd clock pulse rising edge arrives? and then send a zero along the MOSI line until they byte is succesfully read?
---------------------------------------------------------------------------------
I hope I am making sense , its difficult to explain.
Now from what i understand is this:
1.MOSI - Master (temp sensor) sends data(temperature) to slave (mirco controller)
2.Setting the clock phase to 1 or 0 determines if the data is written or read on the falling edge or the rising edge of the clock.
3. CS(Active Low). When pulled low the data will start to send.
What I am trying to understand is:
1.Lets say my temp is 10(Binary) and i want to send that to my micro controller. And my SPI is configured to write on the rising edge of the clock and read on the falling edge of the clock. Will the MOSI go high when the first rising edge of the clock pulse arrives, then go low as soon as the 2nd clock pulse rising edge arrives? and then send a zero along the MOSI line until they byte is succesfully read?
---------------------------------------------------------------------------------
I hope I am making sense , its difficult to explain.