SD card problem!

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.

Reply to
Tech350
Loading thread data ...

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:

--
 [mail]: Chuck F (cbfalconer at maineline dot net) 
 [page]: 
            Try the download section.
Reply to
CBFalconer

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.

Reply to
Tech350

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.

formatting link
formatting link

--
Rich Webb     Norfolk, VA
Reply to
Rich Webb

Rich,

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

Reply to
Core2Duo

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
Reply to
Rich Webb

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

Reply to
don

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.