Arduino Projects   |   Raspberry Pi   |   Electronic Circuits   |   AVR   |   PIC   |   8051   |   Electronic Projects

Insight - How Memory Card works

Written By: 

Ashok Sharma

 

The Secure Digital (SD) Card or more commonly known as memory cards are small size storage devices that are specially designed to store and transfer data from audio and video consumer electronic devices like digicam, cell phones, voice recorders etc. They are known as secure digital card because they include a copyright protection mechanism that complies with the security of the SDMI (Secure Digital Music Initiative) standards. In this mechanism, a mutual authentication and encryptions are used to protect the card content from illegal usage.  

A Typical Memory Card

Fig. 1: A Typical Memory Card

A commonly used memory card is shown in the above image. The notch in the tip right corner of the card helps to identify the right way of attaching with the device. As per the standards, each SD card is formatted with a File Allocation Table (FAT) file system, which allows every operating system to access the files in that system. 

Rear View of A Standard Memory Card

Fig. 2: Rear View of A Standard Memory Card

  
The SD card communicates with the host (PC/Laptop) based on an advanced nine pin interface which is designed to operate at a low voltage. The nine pins, as shown in the above image, are for Clock, Command, Data and Power.

Internal Structure

Image Showing Internal Structure of A Memory Card

Fig. 3: Image Showing Internal Structure of A Memory Card

Outer body is made of plastic with a notch on the top right corner. It incorporates a small circuitry with a flash memory chip and an onboard controller. A small mechanical sliding switch on the left side is used to lock the card. If the switch is moved to position it so as to lock the memory card the card becomes read only i.e., you cannot write or delete any data. In the lock position, the mechanical slider pushes a miniature switch inside the memory card reader. These in turn is detected by the controller of reader which disables the write and delete operations of data.

Memory Chip & Controller

Image Showing Memory Chip and Controller In Memory Card

Fig. 4: Image Showin Memory Chip and Controller In Memory Card

The most important element of the memory card is a flash memory chip and an onboard intelligent controller. The controller manages the operations like interface protocols, security algorithms for copyright protection, power management, clock control, Error Correction Code algorithms, data storage and retrieval, etc. 
 

Circuit Diagram of A Memory Card

Fig. 5: Circuit Diagram of A Memory Card

Electrical Connections

Image Showing Electrical Connections In A Memory Card

Fig. 6: Image Showing Electrical Connections In A Memory Card

The other side of the PCB is shown in the image which represents the circuitry connections. At one end of the PCB, the nine pin interface can be seen which is used to make electrical connections with the card reader in order to communicate the card with other devices. Description of the all pins is given the below table:  
 
Table Showing Details of Pins Present In A Memory Card

Fig. 7: Table Showing Details of Pins Present In A Memory Card

Working:
The working of the memory card is quite simple and could be easily understood by the block diagram of the memory card shown in the image below.  

Image Showing Working of Memory Card

Fig. 8: Image Showing Working of Memory Card

The data is stored in the flash memory chip. Memory chips with different storage capacities are available. The controller of the memory card serves as the interface between the memory and the device with which it is supposed to be used. The devices like digital camera, mobile phone, etc have a slot wherein the memory card is inserted. Devices like Laptops and PC’s have an inbuilt memory card reader or use an external reader which communicates with the memory card and the device through USB. The controller of the memory card incorporates protocols in accordance with the SD standards and performs all the necessary operations like read, write, erase etc.

Comments

good job!
 

SPI                                                                            

An interesting addition might be, that communication with an SD card is through the, widely known, SPI-protocol / standard. It's visible in the image on the last step of this insight, but it isn't mentioned anywhere.

GOOD ACHIEVMENT

nice job

please provide details of mirco sd card

 

nice job

 

please give me the c code for storing the sound in a microcontroller.

the sound is stored in a smart card ,but i am not able to write the code for it.

waiting for reply?

 

 

 

 

 

great......... do briefly with code...

i request admin to update a sample code for interfacing with pic controller.

Waow! Thanks! This helped me a lot and now I can finish my assignment with so many information. Thankyou sooooo much.laugh

Woooooooooow..... I got 25 out of 25 on my assignment   (its the first time)       ....... cool.

Thanks alot.....

Plz, give me c code to store sound in sd card using pic