Hi, I'm using this module http://imall.iteadstudio.com/im120417017.html, which has an SD card shield. I used with the GPS (included in the shield) and I had no problems with it. But I made a code to control an 12 bits ADC, which runs with no problem without adding the SD module, but when I tried to used both in one code I have problems. I use this code to detect troubles wiht the SD conection:
if(!SD.begin(CS))
{
Serial.println("SD Fail !");
return;
}
I always have the "SD Fail !" message in my serial monitor. Im using the default CS (10) for the SD shield, and for my 12 bits ADC im using pin 9 as Chip Select.
At first I tought that my ADC SPI configuration made the problem:
SPI.begin();
SPI.setBitOrder(MSBFIRST);
SPI.setDataMode(SPI_MODE0);
SPI.setClockDivider(SPI_CLOCK_DIV8);
But I used that in my first code and it working normally. So the problem is not in that way.
Please need some help or any suggest in how can I solve it!!!
Thanks.