MicroSD Card
Pin Configuration
Pin Number |
Pin Name |
In SD Mode |
In SPI Mode |
1 |
DAT2/X |
有限公司nnector Data line 2 |
No use |
2 |
DAT3/CS |
有限公司nnector Data line 3 |
Chip Select |
3 |
CMD/DI |
有限公司mmand / Response Line |
Data Input |
4 |
VDD/VDD |
Power supply (+3.3V) |
Power supply (+3.3V) |
5 |
CLK/SCLK |
Clock |
Serial Clock |
6 |
VSS/VSS |
地面 |
地面 |
7 |
DAT0/D0 |
有限公司nnector Data line 0 |
Data Out |
8 |
dat1/x |
有限公司nnector Data line 1 |
No use |
MicroSD Card Features and Specifications
- Operating Voltage: 2.7V to 3.3V
- Capacity: 4GB, 8GB, 16GB, 32GB etc..
- File System: SD/SDHC/SDXC
- 存储系统:FAT12和FAT16
- Transfer Speed: 95 Megabytes per second (typically)
- Speed Class: Class 2 to Class 10
- Form Factor: 11mm × 15mm × 1mm
Where to use an SD card
SD Cards are the most commonly used存储设备inembedded applications. Almost all microcontrollers have a limited Flash memory for programming and a limited EEPROM memory to store important data. However for projects involving Data logging or Pictures or other heavy graphics the programmer might have to save huge piece of data in terms of Mega bytes. In that situation an SD card is employed.
How to use an SD card
The terms SD card stands for “Secure Digital” Card, there aremany types of SD cardsstarting from the RS-MMC big sized ones used in cameras to the micro and mini SD cards that are commonly used in mobile phones, MP3 players etc. Although there are few important differences between all these cards, the underlying working principle is all the same.
SD卡可以以两种操作模式工作,一种正在使用SD modecommands and the other isSPI mode. Most of the Digital cameras and mobile phones will use the SD mode to communicate with the SD card, however this is not of our interest because only the SPI mode to communicate between an SD card and a Microcontroller likeArduino(ATmel),PIC,AVR, etc.. Asimple connection diagram for SPI with a microcontroller如下所示:
The SPI communication requires only four wires and is vastly supported by most of the microcontrollers. However the SD card operates with a voltage of 3.3V and all its pins speak with only 3.3V, the Microcontroller on the other hand might work with +5V in those cases a bi-directional logic level shifter (like74HC245) that can convert the 5V signals to 3.3V is recommended. Once you have interfaced the Card you would have to initialize it and then start communicating with it through the SPI commands, it is not possible to cover the entire process here so you can read through the datasheet below to get more info.
申请
- Portable Electronics
- Data Loggers
- Graphical Displays
- MP3 players
- Audio file handlers
- Image handlers