Finding Error in Interfacing Sd card on Ethernet/Sd shield from Adafruit

markT,

The SD Physical Layer Spec does not say the initial clock must be 380 to 420kHz. It suggests a clock rate of 100 - 400 kHz. Modern SD cards can be initialized at much higher SPI speeds.

The reason is that this allows you to identify MMC cards. I have experimented with about 20 old cards and use F_CPU/64 which is 250 kHz. The clock divisor for card initialization is an option that can be set in the SdFatConfig.h file from F_CPU/128 to F_CPU/2.

I now understand what you mean by the state of MISO. In past versions of SdFat I tried to do the right thing for each operation to insure I read enough data so MISO would be released. This is not very reliable since there are still cases where at least one more clock is required. MMC cards can require eight clocks but I don't support them, only identify them and give an error code.

I now have a chipSelectHigh() routine and will write a byte after setting CS high. This version of SdFat will be released after Arduino 1.0 is released.