Hello everybody,
I am using Arduino due for my application. My application is like arduino will send the data byte to the set of seriously connected shift registers(output of one register is connected to input of next register) through MOSI(which is connected to the input of the first register) and get the same data at MISO which is connected to the output of the last register. SCLK is given to all the shift register as clock source.
My problem is, while reading the data at MISO, am not getting the expected value and there is shift in one bit. i found this shift due to sampling the incoming data from second clock by SPI module which is its nature. For example if it sample at leading edge and clock polarity 0, its not sampling in first leading edge, instead it is sampling in second leading edge which result in a shift of one bit.
Is there any way to change this in SPI library, so that it samples in first clock itself.
Could anyone please help me regarding this.