Difference between revisions of "Interfacing with a Secure Digital (SD) card"

From Mech
Jump to navigationJump to search
Line 1: Line 1:
== Original Assignment ==
== Original Assignment ==


Establish SPI communication between your PIC and a Secure Digital (SD) card for data logging. Demonstrate the ability to store data on the card and to read it back later. Use projects documented on the web as a starting point. See, for example, [http://www.gedanken.demon.co.uk/gps-sd-logger/ this project]. You may wish to display your results on the PC or using an LCD (see, e.g., [[C Example: Serial LCD]] or [[C Example: Parallel Interfacing with LCDs]]).
Establish SPI communication between your PIC and a Secure Digital (SD) card for data logging. Demonstrate the ability to store data on the card and to read it back later.

== Overview ==

[SD cards] are used to hold information in many common electronic devices from digital cameras to mobile phones and come in sizes as small as 16-32 MB and as large as 8 GB. In this lab, we will establish communication between a Microchip PIC 18F4520 and a 2GB SD card manufactured by [Apacer].


Most SD cards can only support clock rates up to 25 MHz, and voltage ranges from 2.0 – 3.6 v. It’s important to limit the clock signal from the PIC to the card to this range.
SD Cards can operate in two modes – SD and SPI, with the latter being appropriate for use with microcontrollers. To learn more about SPI protocol, go here. Only 7 of the 9 pins on the card are actually used in SPI mode – pins 8 and 9 are reserved and should be connected to a pull-up resistor.

Revision as of 14:41, 11 February 2009

Original Assignment

Establish SPI communication between your PIC and a Secure Digital (SD) card for data logging. Demonstrate the ability to store data on the card and to read it back later.

Overview

[SD cards] are used to hold information in many common electronic devices from digital cameras to mobile phones and come in sizes as small as 16-32 MB and as large as 8 GB. In this lab, we will establish communication between a Microchip PIC 18F4520 and a 2GB SD card manufactured by [Apacer].


Most SD cards can only support clock rates up to 25 MHz, and voltage ranges from 2.0 – 3.6 v. It’s important to limit the clock signal from the PIC to the card to this range. SD Cards can operate in two modes – SD and SPI, with the latter being appropriate for use with microcontrollers. To learn more about SPI protocol, go here. Only 7 of the 9 pins on the card are actually used in SPI mode – pins 8 and 9 are reserved and should be connected to a pull-up resistor.