user5064: I need some help to ensure my understanding of how this is supposed to work.
I want to know given the attached serial timing diagram which spi mode should I use?
Based on my newly found knowledge I believe it should be mode 1
How do you use SPI on an Arduino?
Is this correct?


user20245: We can see from your diagrams that the starting state of the clock line after the CS goes active is low indicating a CPOL of zero.  Also, we see that data changes after the falling edge of the clock indicating the CPHA is also zero.  This infers, according to this reference, that the SPI mode is zero.

5064: <p>I need some help to ensure my understanding of how this is supposed to work.</p>

<p>I want to know given the attached serial timing diagram which spi mode should I use?</p>

<p>Based on my newly found knowledge I believe it should be mode 1
<a href="https://arduino.stackexchange.com/questions/16348/how-do-you-use-spi-on-an-arduino">How do you use SPI on an Arduino?</a></p>

<p>Is this correct?</p>

<p><a href="https://i.stack.imgur.com/aWCF7.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aWCF7.gif" alt="enter image description here"></a></p>
 20245: <p>We can see from your diagrams that the starting state of the clock line after the CS goes active is low indicating a CPOL of zero.  Also, we see that data changes after the falling edge of the clock indicating the CPHA is also zero.  This infers, according to <a href="https://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus#Clock_polarity_and_phase" rel="nofollow noreferrer">this reference</a>, that the SPI mode is zero.</p>
