I connected my clock pin to an o-scope and I am not getting any clock signal from it. Any ideas?
I connected my clock pin to an o-scope and I am not getting any clock signal from it. Any ideas?
You have to initialize SPI for it to work, something like this:
SPI.begin();
SPI.setDataMode(SPI_MODE0);
SPI.setClockDivider(SPI_CLOCK_DIV16);
SPI.setBitOrder(MSBFIRST);
and then you can use SPI.transfer to send/receive data.
Please refer to http://arduino.cc/en/Reference/SPI and carefully read the section that describes Slave Select pin, if it is configured for input before you call SPI.begin() you can end up operating SPI hardware in slave mode and clock will not be generated then.
Thanks for the response. I have tried initializing the SPI by writing the exact code minus the SPI.setDataMOde(SPI_MODE0). I will try that and see what happens.
Thanks for the response. I have tried initializing the SPI by writing the exact code minus the SPI.setDataMOde(SPI_MODE0). I will try that and see what happens.