Wednesday, October 22, 2008

Real schematik to interface a SD/MMC card to atmega microcontrollers

Because many sites operate a scheme to connect an SD/MMC card to a ATmega microcontroller that is non functional, I mean scheme with dividing resistive to the ground, I decided to post an overall scheme real functional and will post and parameters operation of a card at different voltages, everything after more probe:

We know that most cards SD/MMC operates in a voltage between 2.7 and 3.6 V, I will recommend one to use the minimum operating voltage.
However such a card works at 5V supply voltage without any risk of failure, but a voltage across the card manufacturer's specifications will work only read data and read CID etc. Write delete functions will not work

SD/MMC card and ATmega at diferent voltages:





SD/MMC card and ATmega at same voltages:


13 comments:

Anonymous said...

This could be unreliable.
The MISO signal from the SD card is at most 2.7 Volts.
The guaranteed minimum logic-high input for the AVR micro is 0.6 VCC -> 3.0 Volts for a Mega8 on 5 Volts.

Also, the voltage dividers on the CS, MOSI and SCK lines will put 4.4 Volts to the SD card inputs.

MorgothCreator said...

All circuits mos including SD / MMC cards have protection diode, these diodes limits tension in input pins to GND-0,6V and Vcc+0.6 V, the resistance of 2.2 K has limited power in entrances and the resistance 10K are in parallel with internal Pull up the card, thus lessen the impedance input and including increasing the frequency of operation, I personally use this scheme and gave no comma having atmega640 Q= 26Mhz and the SPI at 13Mhz

Anonymous said...

This is not any better than the other non-working examples that are mentioned.

The whole circuit could just use 3.3V for the memory card and AVR.

I cannot understand why people want to use different voltages for *BOTH* components of a two-component system.

Using resistors to lower the signal voltage works so that it does not allow working at high speeds and even the data output from card might just operate at the noise margin of the input.

MorgothCreator said...

The same does not understand it either me (why people do not use the same voltage for SD / MMC Card and microcontroller), I use a ATmega640 8AU to 3.3 V and External quartz at 26Mhz, SPI frequency is 13Mhz and use of second schematic picture attached because of resistance to pull up the internal microcontroller can not communicate due impedance too big.
But many friends still use different voltages and I did experiments on this freq spi unit of the 13Mhz, working to 13Mhz, and being able to smaller frequency

Nischay,India said...

Dear Morgoth,
its me again, i have a Atmega8-16Mhz which works with 4.5V to 5.5V, Atmega8L-8Mhz (which works at 2.7 to 5.5V) is not available at our place, so i have to use two voltages 3.3V and 5V, which schematic should i use, without compromising on safety (to SD card), should i use potential divider like 1K8 and 3K3 or what you used 10K and 2K2, which is better and safe?

MorgothCreator said...

Atmega8-16 its work fine and at 16Mhz 2,7V

Nischay,India said...

Dear Morgoth,

So,you mean to say i can use Atmega8-16 part with 3.3 volts without problem?

MorgothCreator said...

Yes you can use ATmega8-16 to 16 MHz 3.3 V.

Nischay,India said...

Thanks a lot ! :) i'll get back to you in case of any problem/s

Nischay,India said...

By the way, i think in your both schematics, the MISO and MOSI lines between Micro and SD card are interchanged - pl.check

MorgothCreator said...

Thanks for you attention, I corrected the error. :)

sildenafil citrate said...

This blog reminded me of my physics classes in college, I remember those issues amps and watts, the hated, mainly because they did not understand anything!

Anonymous said...

now can you post final 3.3v circuit with pull up resistors?