EmbeddedRelated.com
Forums

SD card problem!

Started by Tech350 June 30, 2009
Hello all,

I'm new to this site and this is my first post. I have started a SD card
project where I want to interface the SD card with my MCU. I am using a
PIC18F8520 MCU. Well before I started working with the SD, I worked on the
DAC module successfully (I mentioned this because DAC uses SPI
communication as well). The code for the SD card works until I reach the
the command to check if the SPI transmit bit has been set (to check if
transmit is complete) and it forms an infinite loop there. Now even the DAC
module (with the same working code and set up) is not working. Is it
possible to have a faulty SPI module. If possible can someone please send
me a code in C? I'm as of now formatting the SD in FAT32 format in my
desktop before trying to read it. I'm not sure if I'v given sufficient
information, didn't exactly know what details to post. Thanks in advance.

Regards,
Tech350.


Tech350 wrote:
> > I'm new to this site and this is my first post. ...
Correction - 'this' is NOT a site. You are using a Usenet newsgroup, which is a place for public messages and replies, and covers the entire world. Your 'site' may be providing Usenet access. Some useful links on quoting: <http://www.xs4all.nl/%7ewijnands/nnq/nquote.html> <http://www.complang.tuwien.ac.at/anton/mail-news-errors.html> <http://www.netmeister.org/news/learn2quote2.html> <http://www.star-one.org.uk/computer/format.htm> -- [mail]: Chuck F (cbfalconer at maineline dot net) [page]: <http://cbfalconer.home.att.net> Try the download section.
>Correction - 'this' is NOT a site. You are using a Usenet
My sincere apologies. Now I have a faint idea of usenet - usernetwork. I'm new to this whole concept and still need getting used to. Please correct me if I'm wrong. Best Regards.
On Tue, 30 Jun 2009 08:54:08 -0500, "Tech350" <deepak_estm@yahoo.co.in>
wrote:

>Hello all, > >I'm new to this site and this is my first post. I have started a SD card >project where I want to interface the SD card with my MCU. I am using a >PIC18F8520 MCU. Well before I started working with the SD, I worked on the >DAC module successfully (I mentioned this because DAC uses SPI >communication as well). The code for the SD card works until I reach the >the command to check if the SPI transmit bit has been set (to check if >transmit is complete) and it forms an infinite loop there. Now even the DAC >module (with the same working code and set up) is not working. Is it >possible to have a faulty SPI module. If possible can someone please send >me a code in C? I'm as of now formatting the SD in FAT32 format in my >desktop before trying to read it. I'm not sure if I'v given sufficient >information, didn't exactly know what details to post. Thanks in advance.
Hop over to the Circuit Cellar and get their Jan and Feb 2009 issues (#222 and #223). There are a pair of articles that discuss using a microcontroller to implement an SPI interface to a FAT-formatted SD/MMC card (although I don't recall offhand whether it was FAT-32 or -16). I haven't checked but there may also be a discussion thread about those articles in their forums. http://www.circuitcellar.com/ http://bbs.circuitcellar.com/phpbb/ -- Rich Webb Norfolk, VA
Rich,

Is Circuit Cellar a decent magazine re MCUs?.
I've not seen it before.



"Rich Webb" <bbew.ar@mapson.nozirev.ten> wrote in message 
news:5tkm459eul3d4h6ds89v9fd4jedfn13em6@4ax.com...
> On Tue, 30 Jun 2009 08:54:08 -0500, "Tech350" <deepak_estm@yahoo.co.in> > wrote: > >>Hello all, >> >>I'm new to this site and this is my first post. I have started a SD card >>project where I want to interface the SD card with my MCU. I am using a >>PIC18F8520 MCU. Well before I started working with the SD, I worked on the >>DAC module successfully (I mentioned this because DAC uses SPI >>communication as well). The code for the SD card works until I reach the >>the command to check if the SPI transmit bit has been set (to check if >>transmit is complete) and it forms an infinite loop there. Now even the >>DAC >>module (with the same working code and set up) is not working. Is it >>possible to have a faulty SPI module. If possible can someone please send >>me a code in C? I'm as of now formatting the SD in FAT32 format in my >>desktop before trying to read it. I'm not sure if I'v given sufficient >>information, didn't exactly know what details to post. Thanks in advance. > > Hop over to the Circuit Cellar and get their Jan and Feb 2009 issues > (#222 and #223). There are a pair of articles that discuss using a > microcontroller to implement an SPI interface to a FAT-formatted SD/MMC > card (although I don't recall offhand whether it was FAT-32 or -16). > > I haven't checked but there may also be a discussion thread about those > articles in their forums. > > http://www.circuitcellar.com/ > http://bbs.circuitcellar.com/phpbb/ > > -- > Rich Webb Norfolk, VA
On Tue, 07 Jul 2009 12:51:31 GMT, "Core2Duo" <Core2Duo@theinternet.com>
wrote:

>Rich, > >Is Circuit Cellar a decent magazine re MCUs?. >I've not seen it before.
Steve Ciarcia says that his favorite programming language is solder but he's been doing articles on electronics -- digital and analog -- since the late 70s. Back in the day, we each had Digital Group Z80 systems which is what got me started on his columns in Byte magazine; followed him over there from the BRIDGE Digital Group user group newsletter. The magazine nowadays isn't "about" microcontrollers but they're certainly part of the toolkit. -- Rich Webb Norfolk, VA
Core2Duo wrote:
> Rich, > > Is Circuit Cellar a decent magazine re MCUs?. > I've not seen it before.
Depends what you are looking for. Does it have complete useful projects, not really. Does it have proof of concept projects, yes. Does it have guide line project that can get you going in the 'right' direction, yes. As Rich have stated, its a good mag for understanding what to do next. don