1

I'm using the Arduino Ethernet Pro board and MP3 player shield from Sparkfun (http://www.sparkfun.com/products/10536 and http://www.sparkfun.com/products/10628)

I tried to use the examples provided by Sparkfun but i keep running in to the same errors, which i have nailed down to initializing the SD Card (I'm using the SdFat).

To nail down the core issue i tried running the "SdInfo" example from the SdFat library. This is my output:

SdFat version: 20111205

type any character to start

card.init failed

SD errorCode: 0X1

SD errorData: 0X0

If i change SS_PIN from 9 to 10 in Sd2PinMap.h per Sparkfun instructions (http://www.sparkfun.com/tutorials/295) the sdcard.init(...) method just hangs.

I think the issue is because of a conflict between the W5100 ethernet chip and the MP3 player shield.

Is there any conflicting ports that i am unaware of? Or do i need to disable the W5100 chip?

CodeMonkey
  • 114
  • 1
  • 7

2 Answers2

0

What size SD card are you using? (try using a SD card that is <4GB for compatibility ) You dont need to change it to pin 10 according to the schematic Sparkfun have posted. Also looking at the sparkfun page have you tried this? madsci's Library and also try this init command in the declarations card.init(SPI_FULL_SPEED, 9) .. let me know how that works for you -Ralim

Ralim
  • 1
  • I'm using a 2GB SD Card from SparkFun, so that shouldn't be an issue. I got the sound working so i can play an mp3 stored in the RAM now, so i confirmed that, that works. I have tried madsci's library, no luck still tho. I'm trying to isolate the problem and make a simple program that just retrieves info from the SD card. I tried disabled the MP3 decoder by setting pin 6 (MP3_XDS) and 7 (MP3_DREQ) high and pin 8 (MP3_RESET) low. I disabled the W5100 ethernet chip by setting pin 10 high (The chip select pin) I'm initializing the SD card with pin 9 as chip select pin. – CodeMonkey Apr 14 '12 at 22:51
  • I can see that the default hardware SS pin is 10, which is the same pin as the ethernet chip select pin. Is that causing any conflicts? – CodeMonkey Apr 14 '12 at 22:57
0

You have chip-select conflicts with all of the SPI devices you're using. The "Quick Start" guide on SparkFun for the MP3 shield discusses how to change the SD library to work with the MP3 shield. You need to make similar changes so that you can use yet another CS pin with the MP3 shield, and leave 9 and 10 for the SD card and W5100.

When using multiple SPI devices, it's best to list the CS pins out. When you add a new SPI device, as with the MP3 shield, you'll be able to see which pins are already doing what.

Julie in Austin
  • 966
  • 5
  • 21
  • As far as i can see from the schematic the following pins are CS pins: Pin 10: W5100 (Ethernet) Pin 9: SD Pin 6: MP3 Decoder Which does not seem to cause any conflicts, am i wrong? – CodeMonkey Apr 15 '12 at 16:34
  • I have looked even further into it today, and i still didn't get the SD card to work. I have come to the conclusion that the W5100 chip may be using pin 9, can you/anyone please confirm/deny? I think that the schematics are not accurate in this, so Eagle may have to be used. Schematics: http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Dev/Arduino/Boards/Arduino-Ethernet-v112pg.pdf Eagle files: http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Dev/Arduino/Boards/Arduino-Ethernet-v11.zip Thanks! – CodeMonkey Apr 18 '12 at 03:02