Categories: Hookup Guide-PIC

OpenLab SD Card Hookup Guide

SD Card

The secure digital memory card is the de facto standard memory card for mobile devices. The SD card has a microcontroller in it.The data is transferred from the memory card and the host controller as data block units of 512 bytes. SD card can be interfaced easily with embedded systems.

Basically, an SD card consists of two basic semiconductor sections, a ‘memory core’ and an SD card controller. Memory core section is the flash memory segment where the actual data is saved. SD card controller is responsible for the communication between the memory core and the host controller. It’s response to a set of certain standard SD commands and read or write data from the memory core in for the external device.
The size of the memory core determines the size of the card. There are certain other registers inside the memory card where the status of the card is stored.The content of the status register is read-only.

SD Card is interfaced with the host controller through SPI serial communication protocol.The host microcontroller can write data into the memory card and read data from it through this serial communication protocol.

The above block diagram shows a simple organization of an SD Card.

SPI Protocol

SPI is the serial communication protocol used to interface the SD card with the host controller. SPI is a short form for a serial peripheral interface. SPI is a simple four wire serial communication protocol used by many of the microprocessors/microcontrollers for communication between them. In SPI, the slave is selected according to an active low slave select pin possessed by each slave. The communication is synchronous with a clock generated by the master. SPI can be operated at speeds greater than 10Mhz.
Moreover, SPI is a full duplex communication in which data can be transmitted and received at the same time.

The above block diagram shows simple SPI communication in which multiple slaves are interfaced with a single master.
Each slave can be selected by the master with appropriate signaling in the slave select or chip select (CS)pin. ‘Master out slave in'(MOSI) pin of the master is connected to ‘serial data in'(SDI) of the slave device. ‘Master in slave out'(MISO) is connected with ‘serial data out'(SDO) of the slave device. SCK line carries the clock signal generated by the master device.

OpenLab SD Card Module

OpenLab has a section for interfacing the SD card.

The above image shows the SD card section of the OpenLab. The transistor array near the SD card holder forms level shifters since the SD card operates at a lower voltage of 3.3V.
SD card can be introduced into the OpenLab using the micro SD card adapter like the one shown in the image.
Four jumper caps need to be used in order to connect the module with the SPI of the controller.

Share