SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By dbb
#120119
I'm trying to learn as I go, but I cannot get the microSD shield and my Uno to do anything.

At first I got a bad microSD card from Sparkfun that would not be recognized by my PC. Now I have a new 2G card that I can see it working on my PC but not in the shield. I assume a lot of the comments on the product page and the forum from January 2010 have been addressed in this new one I just purchased. Simply put, after downloading the sdFat library through Sparkfun, and loading in the test example (http://www.sparkfun.com/tutorial/microS ... xample.pde), and then running it, I get nothing on the serial monitor. Inserting the card into my PC shows no files added. If I add a Serial.println(" Test ") to the code under the Serial.print(in_char); statement, I get the text "Test" every second, but nothing else.

Any ideas??

Should I be able to run that example without doing any formatting of the card first? It was formatted in FAT, I reformatted in FAT32 with no change. It may be a simple problem that I don't have the experience to see, but it looks to me like the board is bad. I see a lot of other issues with this shield in the forum so maybe they are correctable problems??

I'd appreciate some better expertise.

Thanks for your time!

Doug
By fll-freak
#120124
I found the FAT library had one significant bug. It had failed to define a pin for a needed IO direction. I added
"pinMode(10, OUTPUT);"
early in the setup method and was then able to get the sample code to work. Hope it works for you.
By dbb
#120128
Yes, I have that statement in the test example code in the 'void setup(void)' function. I assume that's where you mean rather than in the sdFAT library itself.

What is your card formatted in?
By motopic
#120227
Exactly what sd shield do you have?
Does it have spi data level convertors for uno 5v to sd 3.3v???
If yes, then check the return codes for each step of the sd spi init.
I suggest getting sdfat from arduino sections, and not SF.
By dbb
#120241
Well, I finally got it running. I'm not sure exactly what was wrong, but could have been shorts on the soldered pins of the headers. However, I can only run it under certain circumstances.

I have the Sparkfun shield (DEV-098 2). It only runs with the sdFat library from Sparkfun. The Arduino 0022 SD library doesn't work even with the pinMode(10, OUTPUT); statement. The sdFatInfo example does work when the statement is included.

I guess if I don't change anything, all will be well, but I don't know what I'm missing by not using the new SD library.

Thanks for all your help!
By follower
#120280
dbb wrote:I have the Sparkfun shield (DEV-098 2). It only runs with the sdFat library from Sparkfun. The Arduino 0022 SD library doesn't work even with the pinMode(10, OUTPUT); statement.
It should work if you change the SD code examples to use:
Code: Select all
SD.begin(8)
Ignore the product description that talks about the pinMode etc stuff when using the SD library--the description was written before the SD library was included with the IDE.

--Philip;