SD Card Interfacing with ATmega16/32 (FAT32 implementation)
#1

[attachment=10550]
Abstract
In last couple of years the Secure Digital (SD) memory Card has proved itself as a de facto memory solution for all the portable devices and Equipments like camera, PDA, mobile phones, GPS navigation modules, gaming consoles, MP3 players etc.
This article demonstrates how to interface SD card to expand AVR microcontrollers non-volatile data storage capacity. So as to fulfill the excessive memory requirements of a typical embedded application. In this project ATmega16 is interfaced with Transcend 1 GB SD Card (TS1GSDC).
The aim of the project is to accept data from the User through keyboard of the PC and store it in the SD CARD and Retrieve the same when the user wants. The user at first, will be given the option either to read the data from the SDCARD or write to the SDCARD.
The project on interfacing of SD Card (microSD). MicroSD cards are available very cheap nowadays, a great option for having a huge memory in any embedded system project. It is compatible with SPI bus, so the interfacing is easy.But what if your embedded system is memory hungry for application like Data logger for Weather Station or an application in Industrial Automation to Log Alarms and Trends require more non-volatile memory storage (Flash / EEPROM).
A 5v dc adaptor is used which converts the wall plug power (230v AC) to a 5v DC. The SD card works only at 3.3v and the operation voltage range of ATmega16 is 2.7v to 5.5v, hence an LD33 regulator is used to convert the 5v DC to 3.3v DC. This 3.3v is supplied to all the components in this project.The five 47K resistors have been used to Pull up the PORT pins which are connected in between the microcontroller and SD CARD pins.The Socket which holds the SD Card has two Gulls on either side it. These gulls are soldered to the General purpose Board in order to fix it firmly onto the general purpose board.
1. Introduction
The SD Card interface allows for easy integration into any design, regardless of microprocessor used. For compatibility with existing controllers, the SanDisk SD Card offers, in addition to the SD Card interface, an alternate communication protocol, which is based on the SPI standard.
Software Requirements
1. Windows Xp OS
2. AVR Studio 4.18
3. WinAVR GCC Compiler
4. AT Prog Serial Programmer
Hardware Requirements
1. DC power supply 5v,3.3v(230/9v transformer,7805 regulator)
2. ATmega16/32 Microcontroller
3. 1 GB Sd card
4. MAX-232 IC,Standard Cabels
5. SDcard Holder
Applications
1. Data Storages
2. Mobiles, Camera Applications
3. MP3 Players
Future Scope
1. Iimages
Introduction to sd card
The Secure Digital Card is a flash-based memory card that is specifically designed to meet the security, capacity, performance and environmental requirements inherent in newly emerging audio and video consumer electronic devices.
The SD Card includes a copyright protection mechanism that complies with the security of the SDMI standard, and is faster and capable of higher Memory capacity. The SD Card security system uses mutual authentication and a “new cipher algorithm” to protect from illegal usage of the card content. A non-secured access to the user‘s own content is also available. The physical form factor, pin assignment and data transfer protocol are forward compatible with the SD Card, with some additions.
The SD Card communication is based on an advanced nine-pin interface (Clock, Command, 4xData and 3xPower lines) designed to operate in a low voltage range. The communication protocol is defined as part of this specification. The SD Card host interface supports regular Multimedia Card operation as well. In other words, MultiMediaCard forward compatibility was kept. Actually the main difference between SD Card and Multimedia Card is the initialization process.
The SD Card specifications were originally defined by MEI (Matsushita Electric Company), Toshiba Corporation and SanDisk Corporation. Currently, the specifications are controlled by the Secure Digital Association (SDA). The SanDisk SD Card was designed to be compatible with the SD Card Physical Specification.
The SD Card interface allows for easy integration into any design, regardless of microprocessor used. For compatibility with existing controllers, the SanDisk SD Card offers, in addition to the SD Card interface, an alternate communication protocol, which is based on the SPI standard.
General Pin Description.
The SD Card has nine exposed contacts on one side (see Figure 2-1). The host is connected to the SD Card using a dedicated 9-pin connector.
Table 2-1 lists the pin assignments and definitions in SPI Mode
NOTES: 1) S=power supply; I=input; O=output.
2) The ‘RSV’ pins are floating inputs. It is the responsibility of the host designer to connect external pullup resistors to those lines. Otherwise non-expected high current consumption may occur due to the floating inputs
SDCARD Images
SPI Communication
While the SD Card channel is based on command and data bit-streams, which are initiated by a start bit and terminated by a stop bit, the SPI channel is byte oriented. Every command or data block is built of eight bit bytes and is byte aligned (multiples of eight clocks) to the CS signal.
Similar to the SD Bus protocol, the SPI messages are built from command, response and data-block tokens. All communication between host and cards is controlled by the host (master). The host starts every bus transaction by asserting the CS signal low.
A serial peripheral interface (SPI) is an interface that enables the serial (one bit at a time) exchange of data between two devices, one called a master and the other called a slave. An SPI operates in full duplex mode. This means that data can be transferred in both directions at the same time. The SPI is most often employed in systems for communication between the central processing unit (CPU) and peripheral devices
Two identical SPI units are displayed. The left unit is configured as master while the right unit is configured as slave. The MISO, MOSI and SCK lines are connected with the corresponding lines of the other part. The mode in which a part is running determines if they are input or output signal lines. Because a bit is shifted from the master to the slave and from the slave to the master simultaneously in one clock cycle both 8-bit shift registers can be considered as one 16-bit circular shift register. This means that after eight SCK clock pulses the data between master and slave will be exchanged.
The system is single buffered in the transmit direction and double buffered in the receive direction.
This influences the data handling in the following ways:
1. New bytes to be sent can not be written to the data register (SPDR) / shift register before
the entire shift cycle is completed.
2. Received bytes are written to the Receive Buffer immediately after the transmission is Completed.
3. The Receive Buffer has to be read before the next transmission is completed or data will be lost.
4. Reading the SPDR will return the data of the Receive Buffer.
After a transfer is completed the SPI Interrupt Flag (SPIF) will be set in the SPI Status Register
(SPSR). This will cause the corresponding interrupt to be executed if these interrupt and the global interrupts are enabled. Setting the SPI Interrupt Enable (SPIE) bit in the SPCR enables the interrupt of the SPI while setting the I bit in the SREG enables the global interrupts.
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: training report on embedded atmega16, atmega16 codes, programming of atmega16 for traic, atmega16 traffic control codevision project, source code wireless with atmega16, dtmf program for atmega16, atmega16 projects pdf,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  DESIGN AND IMPLEMENTATION OF GOLAY ENCODER AND DECODER computer science crazy 2 23,557 26-08-2016, 03:46 PM
Last Post: anasek
  GSM based SCADA implementation using Microcontroller project report tiger 19 27,705 31-05-2016, 12:13 PM
Last Post: dhanabhagya
  PREPAID CARD FOR PETROL BUNK SYSTEM electronics seminars 7 5,940 27-02-2016, 02:15 PM
Last Post: seminar report asees
  DESIGN AND IMPLEMENTATION OF ASYNCHRONOUS FIFO FOR EMBEDDED APPLICATIONS computer science crazy 1 22,850 14-04-2015, 05:38 PM
Last Post: Guest
  DESIGN AND IMPLEMENTATION OF RADIX-4 BOOTH MULTIPLIER USING VHDL project computer science technology 8 24,939 12-11-2013, 05:36 AM
Last Post: Guest
  smart card based projects computer science technology 7 8,251 26-01-2013, 01:57 PM
Last Post: Redsasa
  Electronic Card Lock System full report project topics 4 6,900 27-12-2012, 12:32 PM
Last Post: seminar details
  Implementation of Static VAR Compensator for Improvement of Power System Stability seminar class 1 1,959 17-11-2012, 11:38 AM
Last Post: seminar details
  PROJECT ON ATM CARD SECURITY SYSTEM computer girl 1 2,827 23-08-2012, 12:55 AM
Last Post: Guest
  IMPLEMENTATION OF ADVANCED ENCRYPTION STANDARD (AES) computer science crazy 5 4,396 14-03-2012, 02:50 PM
Last Post: kapilbanga111

Forum Jump: