Communicate between MEGA and ADAFRUIT SD shield

Hi Team,

Are you able to advise the wiring requirements to communicate between an ARDUINO MEGA 2560 R3 (MEGA) and an ADAFRUIT DATA LOGGING SHIELD FOR ARDUINO (LOGGER).

At this stage, I do not want to use the RTC or on-board features of the LOGGER. The LOGGER will not be mounted directly on the MEGA (which seems to be a common practice) but will instead be on a separate breadboard.

I only require that the MEGA, on demand:

  1. Open a file on the LOGGERs SD card with a name I nominate (if the files doesn’t exist, create the file)
  2. Write/append a single string of text to the file.
  3. Close the file.

I understand I can communicate between the MEGA and the LOGGER using I2C and ICSP/SPI. I am not familiar enough with either protocol to make an informed decision about which is best to use (lowest overheads/simplest to implement). To that end, I’m also not sure which on-line material I should be exploring to identify and then wire my assembly. I will be grateful for any advice (or links to material) that will help me connect the LOGGER to the MEGA and, particularly, the physical connections required between the two devices to power it up and allow data to be written to the SD card on the LOGGER.



Hi Tim,

Why wouldn’t you just connect it to the top of the Mega? It fits right in place and all the unused pins are still accessible. You can even add headers to the top of it for easy jumper wire connections.

If you want to know all the pinouts for the Adafruit data logging shield you can find it on the Wiring and Config Page for that product:

It details all the pins used and what they are used for. There is also a full wiring diagram available on that same page.

Hopefully that gets you started! Best of luck with your project!

Hey Stephen,
Thanks for the prompt reply. Interestingly, I have reviewed the material ad nauseam without being able to identify the actual minimum physical arrangement required for connecting the two devices (hence my post). I guess there is an assumed level of knowledge when reading the material.
I agree installing the hardware on top of the MEGA is an option but it connects “all pins” to “all pins”. I want to understand “what’s what” when it comes to the devices communicating (and which pins are unused). As a novice, I do not find the associated literature clear and I can’t identify any wiring information that explicitly shows the minimum requirements to connect the LOGGER to the MEGA. I have “ guesstimated “ the following wiring diagram to allow the two devices to communicate. Can you please comment on the detail and perhaps correct any error(s) in my draft wiring diagram
Thanks again

Hi Tim,

The minimum to connect it was in the previous link:

  • ICSP SCK - SPI clock
  • Digital #10 - SD Card chip select (can cut a trace to re-assign)

Only three of the six SPI connections are used.

The shield is powered by the 5v pin rather than the Vin pin.

Hopefully that helps!