CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

SD/MMC card

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ombrastein
Guest







SD/MMC card
PostPosted: Fri Jul 13, 2007 9:07 am     Reply with quote

Hello all

Im working on a SD/mmc card reader for a MP3 player.
Im using a 18F452 and CCS PCH compiler

I have tried many difrent code interfaces, the last one beeing the mmcsd.c driver suplied with the latest PCH compiler.

It seems i am doing somthing hopelessly wrong.
My 18F452 is running on 3.3V (regulated by a LD1117)

i have 10k pullups on the DI and DO lines. Im using the standard pins on the hw module, and B5 for the CS signal.

I keep getting the same problem. The initsialisation rutines fail.

the mmcsd.c returns 0x80 wich means the CMD0 comand gives no response...


What could i possibly be doing wrong? THis seems straight forward...

Thx for any help provided. Im lost ...
ombrastein
Guest







PostPosted: Fri Jul 13, 2007 9:19 am     Reply with quote

Forgot to mention that i have conected Vcc, GND, DI, DO CLK and CS pins.

THe rest is left open and floating. Could that be my problem?

COM, WP, CD, PS and IRQ is left open
Guest








PostPosted: Fri Jul 13, 2007 4:41 pm     Reply with quote

seems i had made a very silly mistake.

obiusly DI on the micro goes to DO on the MMC, and the DO on micro to DI on MMC, not DI <-> DI and DO <-> DO



Anyways... next step is to try and read a file of the MMC using the fat.c lib suplied with the CCS compiler...


Anyone tried to use this pice of code? Any experince to share would be most welcome...
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group