Hi there, i´ve got a working MP3 player project with a 18F4620 that took a long to get it working, but now that its done i´ve several clones and brought new sd cards, my problem is that i think that the new cards are faster than the old card i´ve used for debug. The old card is a kingston 1Gb the new card as Silicon Power 1Gb too, what could possibly be wrong?
My answer is if i can make the mmc_init routine to work with the new cards why dont i get response when i try to read from it??
Joined: 12 Aug 2004 Posts: 1635 Location: Perth, Australia
Posted: Tue Jan 27, 2009 1:55 pm
Just because the Kingston card is older does not mean its slower. One of the slowest cards I have tested is a brand new SANdisk 8GB card.
I see a couple of problems.
The initial flushing of the SPI bus is meant to be done BEFORE you select the SD card.
You are not waiting long enough for the card to become ready. it can take 500ms. Inside your "i" for loop insert a 2ms delay. _________________ Regards, Andrew
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