I use Arduino IDE 1.0.4 and sdfatlib20130313.zip from http://code.google.com/p/sdfatlib/downloads/list.My board is APM2.5 MEGA 2560I do it from http://arduino.cc/forum/index.php/topic,65391.0.html Reply #7.But it doesn't work.

Quote

Enter the chip select pin number: 12

SD initialization failed.Do not reformat the card!Is the card correctly inserted?Is chipSelect set to the correct value?Is there a wiring/soldering problem?errorCode: 0x1, errorData: 0xff

If you have any other devices connected to the Mega, disconnect them for this test. Insure the SD card slave select is connected to D12.

edit: How are you powering that SD module? If you are using the 3.3v bus on the Arduino, there is not enough power available on that bus to power a SD card. That bus is limited to about 50ma, and the newer SD cards require about 100ma to read/write.

I have heard on this forum that some of the SD card modules with the voltage divider circuit rather than a true logic level converter can cause problems. As I recall, it is a signal rise and fall time challenge with the larger, newer uSD cards due to the rc component of the circuit. Maybe fat16lib or someone else can add more to that.

Yes, those resistors (R1-R4) in the bottom picture. Unless my eyes are failing (that is possible..I'm old!), those particular resistors are 10Kohm. That will add a considerable rise and fall time delay.

Yes, those resistors (R1-R4) in the bottom picture. Unless my eyes are failing (that is possible..I'm old!), those particular resistors are 10Kohm. That will add a considerable rise and fall time delay.

I would see if fat16lib or someone else has more to add to this thread. It may or may not be that problem. It might help other users if you posted the make, model, and size of the SD card you have in the module, and anything you have done to it, like reformatting. Most of that can be corrected.

If it is the new rc component of that circuit, you will probably need to get another type of SD module. To insure the best performance, get one with a logic level converter, not the voltage divider.