mega2560 and sd/ethernet shield

Hello,

a question:
I notice that I can't read my sd card anymore with my new mega2560 (even with the standard sketches from sdfat lib).
It keeps hanging on the initialisation of the sdcard:
if (!card.init(SPI_HALF_SPEED)) error("card.init failed!");

It works perfectly with my duemilenova.

According to the information , I understand that the mega2560 is fully compatible for this shield, or am I wrong ?

Best regards,
Jeroen.

I recieved my Arduino mega 2560 yester day with the new ethernet shield but i haven't tried to do anything yet...

i'll let you know!! :sunglasses:

ok SaSaa, thanks,

I'm looking forward to your experience.

Can you also check my other thead http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1286388102
A line of code which always screws up the uploading on the mega2560.

Best regards,
Jeroen.

I can't seem to make it work but i only have 1 micro sd card...

Hello Sasaa,

will you also try the code in following tread http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1286388102

It will take just one minute. If this is a real bug, we can open one in the forum.

Will you inform we when you succeed ith the SD, I will also keep you up2date. I will also try the ethernet shield.

Thanks in advance.

Hello,

found the solution.

The MEGA2560 needs to be known in the SDFAT lib.
change in Sd2PinMap.h
the line:
#if defined(AVR_ATmega1280)
TO
#if defined(AVR_ATmega2560)

recompile and upload

and it works fluwently

Best regards,
Jeroen

If you down load the latest version of SDfat it has the above additions. The new version was just posted over the weekend.

sdfatlib20101010

RD