SD I/O Error with Wave Shield and Arduino MEGA

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
wolffan
 
Posts: 8
Joined: Mon Feb 01, 2010 3:13 pm

SD I/O Error with Wave Shield and Arduino MEGA

Post by wolffan »

I have version 1.1 of the Wave Shield and an Arduino Mega. I followed all of the advice in these forums and I am still getting the following error:

Error: Card init. failed!
SD I/O error: 1, FF

Here is some more detail...

HARDWARE CONNECTIONS: I am fairly confident that I soldered everything correctly. I even had one of the electronic technicians at work look it over in detail (he's good at catching bad solder joints). I made the following jumpers as per gregsadetsky's post for the Arduino Mega:
A cable going from the "CCS" hole on the shield connects with the digital pin 53 on the Mega.
A cable going from the digital input/output hole 11 on the shield connects with the digital pin 51 on the Mega.
A cable going from the digital input/output hole 12 on the shield connects with the digital pin 50 on the Mega.
A cable going from the digital input/output hole 13 on the shield connects with the digital pin 52 on the Mega.

I made sure that all of the ground pins on the Wave shield were connected to ground.

SOFTWARE: I tried both the WaveHC and AF_Wave libraries and examples. When I used AF_Wave I replaced "sd_raw_config.h" and "dac.h" with the files updated by gregsadetsky for use with the Mega.

No matter what I do, I get the same Card Init error. Any suggestions for things I could try?

User avatar
wolffan
 
Posts: 8
Joined: Mon Feb 01, 2010 3:13 pm

Re: SD I/O Error with Wave Shield and Arduino MEGA

Post by wolffan »

I still have not been able to get my Wave Shield to work, so I thought I would make sure my Arduino pins were working.

I ran "blink.pde" on digital pins 50, 51, 52, and 53 and they were not blinking my LED properly. So, I hooked up a multimeter and those four pins are acting strange. Two of them stayed at a value of 4.3 V even though they were supposed to "blink" between 0V and 5V. And, the other two jumped between 1.5V and 3.5V each second, instead of 0V and 5V. I checked all other digital pins and they "blink" nicely between 0V and 4.5V each second.

Long story short... Are the SPI digital pins supposed to output the same voltages as the other digital pins when set HIGH and LOW? If so, should I assume my MEGA is broken (I just bought it)?

mtbf0
 
Posts: 1645
Joined: Sat Nov 10, 2007 12:59 am

Re: SD I/O Error with Wave Shield and Arduino MEGA

Post by mtbf0 »

do you still have the shield connected? the sd card talks at 3.3 volts.

User avatar
wolffan
 
Posts: 8
Joined: Mon Feb 01, 2010 3:13 pm

Re: SD I/O Error with Wave Shield and Arduino MEGA

Post by wolffan »

No, I was checking my Arduino with the shield disconnected.

User avatar
troglodisme
 
Posts: 46
Joined: Fri Apr 02, 2010 12:01 pm

Re: SD I/O Error with Wave Shield and Arduino MEGA

Post by troglodisme »

Hello mate, I am just getting the same stuff after finishing my wave shield... I don't really understand what it could be!!! Did you find any solution?

gandrewstone
 
Posts: 6
Joined: Sun Mar 08, 2009 10:14 pm

Re: SD I/O Error with Wave Shield and Arduino MEGA

Post by gandrewstone »

I was getting this with a normal Arduino and the problem was that I was talking to the SD card on the wrong IO lines. So either:
1. you're using the wrong IO lines to talk to the card (check your HW against the pin def header file).
2. Your card is broken or not plugged in.
3. the card reader is not correctly soldered on.

When I got that working, I got a hang at the same spot. It turned out that I had moved my SS pin from the SPI default (pin 10) to pin 9. If you do this, you must still configure SS (whatever is defined as SS on the mega) as an output pin (or as an input with a pull-up). Not sure what pin this is on the mega...
Last edited by gandrewstone on Mon Apr 26, 2010 10:19 am, edited 1 time in total.

User avatar
fat16lib
 
Posts: 595
Joined: Wed Dec 24, 2008 1:54 pm

Re: SD I/O Error with Wave Shield and Arduino MEGA

Post by fat16lib »

On the mega you must use
pin 50 MISO
pin 51 MOSI
pin 52 SCK

If you do not use pin 53 for slave select, it must be set to output mode or held high in input mode. From 1280 datasheet (SS means pin 53 here)
When the SPI is configured as a Master (MSTR in SPCR is set), the user can determine the direction of the SS pin.

If SS is configured as an output, the pin is a general output pin which does not affect the SPI system. Typically, the pin will be driving the SS pin of the SPI Slave.

If SS is configured as an input, it must be held high to ensure Master SPI operation.

hillarywelch
 
Posts: 2
Joined: Wed Dec 02, 2009 5:39 pm

Re: SD I/O Error with Wave Shield and Arduino MEGA

Post by hillarywelch »

I was having the same problem. I tried just setting the shield on top of the Mega without soldering any of the pins but, of course that didn't work. I was skeptical of making the wave shield work at all with the mega, partly because of my lack of experience in soldering, but after soldering the pins it worked. That was, after I realized I had to put the SD Card in the shield. I felt so stupid for overlooking something so simple, but was extremely happy it finally worked! With that said, have you soldered the pins to the shield, and inserted the SD Card?

User avatar
wolffan
 
Posts: 8
Joined: Mon Feb 01, 2010 3:13 pm

Re: SD I/O Error with Wave Shield and Arduino MEGA

Post by wolffan »

To all,

I found the solution to my problem.... my Arduino MEGA was defective. It worked for a little while, and then the SPI pins went bad. I got a replacement for free and everything works well with the WaveShield.

Thanks for all of your comments!

-Andy

bpratt
 
Posts: 1
Joined: Thu Oct 28, 2010 1:25 am

Re: SD I/O Error with Wave Shield and Arduino MEGA

Post by bpratt »

Just a note to say that I had the same problem, the solution was to find and fix two bad solder joints I'd made on the card holder. (I have a hard time with surface mount hand soldering...). Works a treat now!

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”