Go Down

Topic: Cant initialize SD card on Mega Pro 3.3V (Read 946 times) previous topic - next topic

I have a sparkfun Mega Pro 3.3V(https://www.sparkfun.com/products/10744) and a sparkfun SD breakout board (https://www.sparkfun.com/products/544). I followed the tutorial on adafruit to connect my 2gb SD card to the arduino, and used their SD library,  But I always get "Initialization Failed" in the serial monitor. I verified the breakout board is getting power and all pins connect to the proper pins on the arduino, but I still get this error. The card was formatted to FAT16 by the formatting tool adafruit linked to. I read online that you have to change a line on the "Sd2card.h" file. I changed
Code: [Select]
#define MEGA_SOFT_SPI 0 to
Code: [Select]
#define MEGA_SOFT_SPI 1) and it still doesn't work. I also edited the pin numbers on the "Cardinfo" code to
Code: [Select]
pinMode(53, OUTPUT);   const int chipSelect = 53;

What else can I try?

ghlawrence2000

#1
Jan 25, 2013, 03:39 am Last Edit: Jan 25, 2013, 03:51 am by ghlawrence2000 Reason: 1
You say you followed 'tutorial on adafruit'.... and 'all pins connect to proper pins on arduino'........ The adafruit SD libraries work fine....


Confirm your connections thus :-

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy