nuelectronics ethernet + sd card

hi all,

has anyone ever got a nuelectronics ethernet shield and a sd card working together?

I'm trying hard on this. I changed CS ports so that each component has it's on CS. pins 11,12,13 are shared. if I disconnect ethernet shield from pin 12 my sd card works.

Any help is welcome

Thanks

It appears that the ethernet shield has issues with other devices using the SPI port, this won't help much but there is another thread with very similar issues. Using an LCD and the ethernet shield.

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1231069174

Your testing with the ethernet shield has confirmed that most of my theory is sound in that thread though. So it's quite possible that the initialisation routines are messing each other up.

have you tried swapping the order in which the SD card and ethernet shield get 'initialised'? Have you got any other boards that use SPI that you could test with the SDCard/Ethernet shield?

Reggie,

to my oppinion executing a scetch that ignores the ethernet shield just accessing the right pins should work.
I'm trying a fat16 scetch (fat16info) and it works.
But it works only if pin12 (MISO) is disconnected from the ethernet shield.
connecting/disconnecting this pin on the ehternet shield toggles fat16info work/don't work.

The other way round trying webserver scetch woks always (without disconnecting the sd card).

any ideas?

At the moment I can't see a reason for it to fail in that manner. unless the data never makes it that far because of something in the circuit that we are unaware of. I can't see any cpol etc. settings in the ethernet shield lib. That's really the last unknown, it sets the clock edges that data is sent and recieved on.

I'm leaning towards editing one of the libs init function so that only one of them deals with setting up the SPI, not sure whether that will make a difference,

I'll be able to look into things in more detail when my SD card breakout board turns up, currently in the middle of a postal strike in the UK :frowning: do you have anything else that uses SPI that you could test with the eth. shield and the sd card?

unfortunately I have no 2. spi component.
next week im planning to buy some components to make more tests on this topic.

Me either, My sparkfun delivery turned up which should've had my SD sheild in it but the package is someone elses order :frowning: