Hello, has anyone gotten the SD card to initialize with the switch set to 'micro'? I have a mega 2560 with the wireless SD shield, xbee works fine, sd writing works fine, however the SD card will only initialize when the switch is set to 'usb'. I need this unit to be able to start in the field, with no on around to switch it to 'micro' after the SD car initializes.
They are both SPI MODE0 devices with MSBFIRST, so they should be compatible. If you post your code, maybe I (or someone else) can show you how to initialize them to work together.
My bad. I thought you were talking about the Arduino wifi shield, not an XBee shield. And you mentioned nothing of the RTC device. A link to all your hardware might help.
The RTC is just a small clock that runs off the SDA/SCL pins with the wire lib...
I've had this problem since the beginning of the project, adding the clock didn't change anything. I haven't connected anything to pin 53 (SS pin), and don't know if it will help initialization.
Well the fix to this problem seems to be to to wire a jumper from pin 53 on the mega to the CS pin (pin 4) on the shield and use pin 53 as the CS pin in software. Unknown why switching between 'usb' and 'micro' affects the operation of pin 4 on the mega.