Secure Digital card SPI

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello, I was wondering if someone could help me in figuring out what pins to solder on my secure digital memory card? I have a microSD card, a microSD to standard SD adapter and I want to connect it to my ATMega 16 using jumper cables and SPI. What pins on the SD adapter card do I need to solder header pins to? Will I need any resistors anywhere in between my sd card pins and the AVR? If so, what should their resistance be? I have a development board that has a jumper on it that allows 5V or 3.3V operating voltage.

From the pictures I'm posting, I think that I need to solder header pins to the folowing pins on the microSD to SD adapter:

Pin 1: Not Connected
Pin 2: Chip Select
Pin 3: MOSI
Pin 4: +3.3v
Pin 5: Clock
Pin 6: Ground
Pin 7: MISO
Pin 8: Not Connected
Pin 9: Not Connected

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This page shows a working setup:
http://elasticsheep.com/2010/01/...

I have no special talents.  I am only passionately curious. - Albert Einstein

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That's where I got my information from. However, the person soldered 7 pins onto the microSD to stanadard SD adapter. They were later corrected in the comments because the had the microSD pin layout wrong. Now I don't know if the picture with 7 pins is correct or what I wrote with only 6 pins.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Can I assume you already read this?:

http://elm-chan.org/docs/mmc/mmc...

I just use this every time I want to wire up a card:

Note that the table on the left has a column for SPI - just connect those pins to the similarly named pins on the micro you want to connect to.

Like most of us I assume you will be using FatFs for software support? I would recommend reading every last detail you can find on E L Chan's most excellent site before you start!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm sorry I'm still confused. On a normal SD card pin 1 is CS for SPI on a microsd card, if you look at my pics, it says that pin1 is not connected and that pin 2 on a normal sd card is pin 1 on a micro sd card. Do I need pin 1 on the microsd to sd adapter or not?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Your own table in the first post surely documents the correct wiring doesn't it?

Why do just connect flying wires terminating in 0.1" sockets/plugs to the uSD socket and stick an AVR in a breadboard then try the wiring - only worry about re-ordering things if it does not appear to work. When you have the correct wiring get the soldering iron out for the final wiring.

(this is known as "prototyping" - it appears to be a dying art).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I got it working, the first table is correct for both a normal SD card and a microSD card adapter.