know your sd memory card
TRANSCRIPT
-
7/29/2019 Know your SD Memory Card
1/5
http://binlibrary.blogspot.in copyright@ 2013
BinLibrary- Do-It- Yourself 2013
http://binlibrary.blogspot.in
-
7/29/2019 Know your SD Memory Card
2/5
http://binlibrary.blogspot.in copyright@ 2013
BinLibrary- Do-It- Yourself 2013
Know your: SD Card
SD, sound weird; what is SD as we know its memory device, it expanse as secure
digital (SD).Its basically used in PDA device, Mobile device, GPS device, and many more. SD
comes in different memory size, about 2 GB to 128 GB even more. The SD card comes with
three specifications Standard, Mini, and Micro. SD card specifications are maintained by six
hundred members association. Mini SD and Micro SD come with adapter support.
Standard SD vs Micro SD
Standard SD Micro Sd
Dimension 32 x 24 x2.1 mm 21.5 x 20 x 1.4mm
Card Weight 2.0 grams 1.0 grams
Operating Voltage 2.7-3.6V 2.7-3.6V
Write Protect Yes Yes
Pins 9 11
Interface SD or SPI SD or SPI
Current Consumption
-
7/29/2019 Know your SD Memory Card
3/5
http://binlibrary.blogspot.in copyright@ 2013
BinLibrary- Do-It- Yourself 2013
Pin Layout:
Standard SD card Pin Layout
Sno Name SD Description
1 CD/DAT3/CS Data line 3
2 CMD/Datain Command/response
3 VSS Supply ground
4 VDD Supply voltage
5 CLK Clock
6 VSS2 Supply Voltage Ground
7 DAT0 Data line 0
8 DAT1 Data line 1
9 DAT2 Data line 2
SPI- Serial Peripheral Interface
The SPI (Serial Peripheral Interface) bus is a synchronous serial bus standard named by
Motorola that operates in full duplex mode. Devices on a SPI bus operate in master slave
mode, where the master device initiates the data transfer, selects a slave, and provides a
clock for the slaves. This protocol used to interface SD card to microcontroller, this protocol
used in following,
SD
1 2 3 4 5 6 7 89
-
7/29/2019 Know your SD Memory Card
4/5
http://binlibrary.blogspot.in copyright@ 2013
BinLibrary- Do-It- Yourself 2013
Memory devices (SD cards) Sensors Real-time clocks Communications devices Displays
Reading Data
The SD card in SPI mode supports single-block and multiple-block read operations. The host
should set the block length. After a valid read command the card responds with a response
token, followed by a data block and a CRC check. The block length can be between 1 and
512 bytes. The starting address can be any valid address in the address range of the card. In
multiple-block read operations, the card sends data blocks with each block having its own
CRC check attached to the end of the block.
Writing Data
The SD card in SPI mode supports single- or multiple-block write operations. After receiving
a valid write command from the host, the card responds with a response token and waits to
receive a data block. A one-byte start block token is added to the beginning of every data
block. After receiving the data block the card responds with a data response token, and
the card is programmed as long as the data block is received with no errors. In multiple-
block write operations the host sends the data blocks one after the other, each preceded by
a start block token. The card sends a response byte after receiving each data block. Card
Size Parameters SD cards are available in various sizes. At the time of writing, SanDisk
Corporation (www.sandisk.com) offered the models and capacities. The company may now
be offering models with 4GB or even greater capacity. In addition to the normal storage
area on the card, there is also a protected area pertaining to the secured copyright
management. This area can be used by applications to save security-related data and can be
accessed by the host using secured read/write commands. The card write protection
mechanism does not affect this area. the size of the protected area and the data area
available to the user for reading and writing data. For example, a 1GB card has 20,480
blocks (one block is 512 bytes) of protected area and 1,983,744 blocks of user data area.
Model Protected Area User Area
SDSDB-16 352 28,800
SDSDB-32 736 59,776
SDSDJ-64 1376 121,856
SDSDJ-128 2624 246,016
SDSDJ-256 5376 494,080
SDSDJ-1024 20,480 1,983,744
-
7/29/2019 Know your SD Memory Card
5/5
http://binlibrary.blogspot.in copyright@ 2013
BinLibrary- Do-It- Yourself 2013
1 Block = 512 bytes
Data can be written to or read from any sector of the card using raw sector access methods.
In general, SD card data is structured as a file system and two DOS-formatted partitions are
placed on the card: the user area and the security protected area. The size of each area is
shown in Table 7.7. For example, in a 1GB card, the size of the security protected area is 519
sectors (1 sector is 512 bytes), and the size of the user data area is 1,982,976 sectors.
Card Holder
A card can be inserted and removed from the bus without any damage. This is because all
data transfer operations are protected by cyclic redundancy check (CRC) codes, and any bit
changes caused by inserting or removing a card can easily be detected. SD cards typically
operate with a supply voltage of 2.7V. The maximum allowed power supply voltage is 3.6V.If the card is to be operated from a standard 5.0V supply, a voltage regulator should be used
to drop the voltage to 2.7V. Using an SD card requires the card to be inserted into a special
card holder with external contacts so connections are easily made to the required card pins.