sd card

Sorry for the delay. I usually check my mail every day.

The pins are defined in the .h file.

In that file change:
#define setupDDRB DDRB |= 0x2c; //set SS as output for cs
#define selectSDCARD PORTB &= ~0x04; //set the SS to 0 to select the sd card
#define deselectSDCARD PORTB |= 0x04; //set the SS to 1 to deselect the sd card

To:

#define setupDDRB DDRB |= 0x28; //set SS as output for cs
#define setupDDRD DDRD |= 0x20; //set SS as output for cs
#define selectSDCARD PORTD &= ~0x20; //set the SS to 0 to select the sd card
#define deselectSDCARD PORTD |= 0x20; //set the SS to 1 to deselect the sd card

In the .ccp file add:

setupDDRD;

after setupDDRB; in the function
unsigned char SDCARDclass::SD_reset(void)

While you are in the .h file delete all the ; at the end of the define macro statements. Its not correct to have them see:

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

Let me know if this works for you.