Pages: [1]   Go Down
Author Topic: microSD fails to initialize with Arduino Due and Sparkfun microSD shield  (Read 833 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I'm trying to interface my Sparkfun microSD with my Arduino Due. I had quite a few problems with it so I tried to use this simple program with it but it fails -> http://arduino.cc/en/Tutorial/CardInfo . The following message appears in the serial monitor: "initialization failed. Things to check:..."

The code doesn't work off the bat and I had to add the SPI header line. -> #include <SPI.h>

I tried it with an Arduino UNO too but that fails as well. My microSD card is a 2GB card formated into FAT32. I also changed the CS to 8 as I am using a Sparkfun microSD shield.

The quickstart guide from Sparkfun instructed me to solder the headers onto the shield, but I am currently using the shield without the headers soldered on, to test it. How likely is it that this is the issue?

Any help is appreciated.

Thanks
Logged

0
Offline Offline
Edison Member
*
Karma: 67
Posts: 1673
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The quickstart guide from Sparkfun instructed me to solder the headers onto the shield, but I am currently using the shield without the headers soldered on, to test it. How likely is it that this is the issue?
It's very unlikely to work unless the headers are soldered.

Quote
My microSD card is a 2GB card formated into FAT32.
This is a bad choice.  FAT32 should only be used on 4 GB and larger cards.  SD cards are designed for standard formats specified by the SD association.  Using other formats can degrade performance.

Don't use Windows, OS X, or Linux utilities to format SD cards.  This is the best formatter https://www.sdcard.org/downloads/formatter_4/.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you very much for the advice. I reformatted the card to FAT (aka FAT16), and soldered the headers onto the shield. But I'm still getting an error for initialization.

I've attached my photos of the soldering job. Did I mess it up?


* photo 1.JPG (1838.06 KB, 3264x2448 - viewed 38 times.)

* photo 2.JPG (1998.03 KB, 3264x2448 - viewed 32 times.)
Logged

0
Offline Offline
Edison Member
*
Karma: 67
Posts: 1673
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This shield will not work with Due.  It does not connect to the SPI header on Due.
Quote
Due SPI: SPI header (ICSP header on other Arduino boards)
These pins support SPI communication using the SPI library. The SPI pins are broken out on the central 6-pin header, which is physically compatible with the Uno, Leonardo and Mega2560.

Try it on Uno with chip select set to pin 8.

Quote
I reformatted the card to FAT (aka FAT16),

You should use the SD association's formatter.  It selects the correct cluster size and adds hidden blocks to align flash memory boundaries properly for best performance.

Modern SD cards have very large complex flash chips and OS utilities do not understand how to format  SD cards for optimum performance.
Logged

Pages: [1]   Go Up
Jump to: