View previous topic :: View next topic |
Author |
Message |
arunb
Joined: 08 Sep 2003 Posts: 492 Location: India
|
Some clarification in using the CCS mmc drivers for microSD |
Posted: Wed Jun 17, 2009 1:25 am |
|
|
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
|
Re: Some clarification in using the CCS mmc drivers for micr |
Posted: Wed Jun 17, 2009 9:18 am |
|
|
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
|
|
Posted: Wed Jun 17, 2009 11:28 pm |
|
|
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
|
|
Posted: Wed Jun 17, 2009 11:44 pm |
|
|
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
|
RE: |
Posted: Thu Jun 18, 2009 1:09 am |
|
|
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 |
|
|
|