Category Archives: sd card

FAT/FAT16 tables – finding the data

Having successfully found the root directory on our sd card, we now need to start actually reading the data back from it. This is the last little link in a chain ofinitialise the sd cardfind the lba (logical block address) by reading sector zeroread th… Continue reading

Posted in fat tables, News, sd card | Comments Off

Reading and writing to a single sector on an SD card with a PIC microcontroller

Having got our sd card to respond to the SPI initialisation routines and “boot up” correctly, it’s time to actually start reading and writing data to the card.The first thing to understand is that an SD card is made up from a series of sectors. Ea… Continue reading

Posted in News, sd card | Comments Off

How SPI works with an SD card

SD cards have two main operating modes.Their default mode is high-speed through 4-bit wide port but we’re going to be working with the “legacy” SPI (two-wire) mode.In SPI mode, the master device (our microcontroller) talks to the slave device (the sd c… Continue reading

Posted in News, sd card | Comments Off

Talking to an SD card from a PIC 16F1825 microcontroller

Following on from our earlier post, we’re continuing with our create-an-audio-module project which reads wav file data from an SD card and plays it through a speaker.So far, we’ve written the basic framework, using Sourceboost C so now it’s time to sta… Continue reading

Posted in 16F1825, News, sd card | Comments Off

A short interruption for a demo

Here’s a quick movie showing our final audio player actually being used in a final product.The PIC has been programmed to read a value from eeprom, increase it by one, rollover back to zero once a certain value is reached, and use this value to decide … Continue reading

Posted in 16F1825, audio, News, sd card | Comments Off

SD card clock edge problems?

There’s something still not right with our SD card initialisation routines.We’ve suspected for a while that there’s something going on with the clock edge for reading/writing responses to/from the SD card.Our logic probe appears to be displaying what w… Continue reading

Posted in logic analyser, News, sd card | Comments Off

SD card send/receive still not quite there

After breathing a massive sign of relief once the SD card starting responding to SPI commands, we thought it’d be relatively straight forward to get data into and out of the card. We’ve already worked with NAND flash memory (in our case AT45DB041D eepr… Continue reading

Posted in logic analyser, News, sd card | Comments Off

Initialising an SD card with a 16F1825 PIC microcontroller

After nearly two days of headache and heartache – and thanks in no small part to the brilliant Arduino/AVR code from Chris McClelland- we finally managed to successfully initialise an SD card with our PIC microcontroller.Before we stuff it up and it st… Continue reading

Posted in 16F1825, logic analyser, News, sd card | Comments Off

SD Card SPI timing graphs

This whole SD-card-access-via-SPI is proving to be a bit of a headache.Just to make sure we’re not having a timing issue (cards need to be interfaced at < 400khz until properly initialised) we’ve even resorted to bit-banging the SPI and introducing … Continue reading

Posted in logic analyser, News, sd card | Comments Off

Sourceboost SD Card reader

We’re having a bit of a time of it at the minute, just trying to get our PIC16F1825 to correctly initialise an SD card. It’s not helped by the fact that we’re using a new chip we’ve never used before, in a language/syntax we’ve not used for a long time… Continue reading

Posted in 16F1825, logic analyser, News, sd card | Comments Off