SOLVED - Set SPI_QUARTER_SPEED in updated SD library?

Hi there,

I am hoping someone can help with this:

I have an ITead 3.2" touch screen with an onboard SD card slot. The SD card slot / SD card are working fine, but only after I set SPI_QUARTER_SPEED, as in this example:

// we'll use the initialization code from the utility libraries
// since we're just testing if the card is working!
if (!card.init(SPI_QUARTER_SPEED, chipSelect)) {
Serial.println("initialization failed. Things to check:");
Serial.println("* is a card is inserted?");
Serial.println("* Is your wiring correct?");
Serial.println("* did you change the chipSelect pin to match your shield or module?");
return;
} else {
Serial.println("Wiring is correct and a card is present.");
}

however how do i set the SPI speed in the case where I use SD.begin (as in http://arduino.cc/en/Tutorial/Datalogger)? Has the SPI speed setting been dropped from the newer version of the library? There is no more reference to any "init" or "SPI_QUARTER_SPEED" anymore.

I've tried setting SPI speed globally via the SPI library but that didn't work.

Any suggestions?

Ok, I've found a way of doing it.

It seems the underlying SDfatlib commands can be accessed from the utilities folder in the library by using
Sd2Card card;
SdVolume volume;
SdFile root;
const uint8_t chipSelect = 53; (pin 10 for uno)

and then in setup calling
SD.begin()
if (!card.init(SPI_QUARTER_SPEED, chipSelect))

This will cause problems since you now have two instances of card, volume, and root. The ones you define and the second set in the SD wrapper object.

I don't have a better solution since the Arduino developers did not allow the SPI speed to be set in their SD wrapper.

Guess you could edit SD.h and SD.cpp and add a second parameter to begin for SPI speed.

ITead 3.2" touch screen with an onboard SD card slot
Note- I've got similar and there are 1kohm resistors in series with sdcard signals (for an unknown reason), so check it. It will not help when run full spead..p.