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 CCS Technical Support

Some clarification in using the CCS mmc drivers for microSD

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



Joined: 08 Sep 2003
Posts: 492
Location: India

View user's profile Send private message Send e-mail

Some clarification in using the CCS mmc drivers for microSD
PostPosted: Wed Jun 17, 2009 1:25 am     Reply with quote

Hi,

Can the MMC driver in PICC folder be used for a microSD card ??, if not what changes would be required ?

thanks
arunb
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

Re: Some clarification in using the CCS mmc drivers for micr
PostPosted: Wed Jun 17, 2009 9:18 am     Reply with quote

arunb wrote:
Hi,

Can the MMC driver in PICC folder be used for a microSD card ??, if not what changes would be required ?

thanks
arunb


If the MMC driver is actually an MMC and SD driver then it will work however, if the driver is MMC only then it will not initialize an SD, miniSD or microSD card.

If you want to buy a driver, my drivers will work using the SPI interface with MMC, SD and SDHC including standard, mini and micro formats.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
arunb



Joined: 08 Sep 2003
Posts: 492
Location: India

View user's profile Send private message Send e-mail

PostPosted: Wed Jun 17, 2009 11:28 pm     Reply with quote

I used the mmc_spi.c driver code.

I uses the driver without modification to the initialisation and read routines, but while writing to the card , the spi state remained busy. So I increased the timeout for waiting , this solved the problem.

It seems the mmc driver works very well for the microSD card.

Are the initialisation procedures for MMC and microSD card different ?? If so how come it works for me ??

thanks
arunb

PS: Thank you for the offer. I will consider it some time in the future, when my application would need greater features such as FAT16 support etc.
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Wed Jun 17, 2009 11:44 pm     Reply with quote

arunb wrote:
I used the mmc_spi.c driver code.

Are the initialisation procedures for MMC and microSD card different ??


Yes

Quote:
If so how come it works for me ??


It means the driver has been specifically coded with both the MMC and the SD initialization sequences.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
arunb



Joined: 08 Sep 2003
Posts: 492
Location: India

View user's profile Send private message Send e-mail

RE:
PostPosted: Thu Jun 18, 2009 1:09 am     Reply with quote

There is another file mmcsd.c, this supports both MMC and SD cards.
But no such thing is mentioned in the mmc_spi.c file. So I assume this meant only for a MMC card.

Also the mmc_spi.c driver did not work for the microSD card, the card initialised correctly, mmc_read_block also worked, mmc_write_block managed to write data to the card but returned error " mmc spi is busy" .

When I checked the status of the DI pin in the microSD card, it was high, so I assumed that the timeout needed to be increased, which I set to 3000 instead of 1000.

Now the drivers work perfectly.

thanks
arunb
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