Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help using micro SD MMC card

Status
Not open for further replies.

pappu_sam

Member level 1
Joined
Dec 31, 2009
Messages
39
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
HYDERABAD
Activity points
1,559
hi all,
am trying to interface micro SD MMC card with PIC18F4620,
inserting micro SD card into Adapter.
but am not getting the pin assignment of this adapter which is having 9 pins
can anyone please help me to know the pin assignment.
 

^^^ thnx very much......

we r using SPI protocol to interface with microcontroller.
so here we have to use microSD card in SPI mode.......am i right???
 

if it is correct! moreover, because the "SD company" does not permit the use of channel 4-bit Open Source applications, you can only use the SPI mode

here's a chart explaining the necessary licenses (this in Spanish but I understood)


https://es.wikipedia.org/wiki/Secure_Digital


regards.
 

Hey, its totally Spanish and i don't know this language.
Can any one suggest me another way from i can get
whole licenses in my mother tonge!! I would like to thanks you all
in advance.

________________________
**broken link removed**
 

The most important are the following
if you can develop a driver without a license and if Supports SPI mode

Compatible with develop open source:

MMC = YES
RS-MMC = YES
MMC-Plus = NO
Secure-MMC = YES
SD = ONLY SPI
SDIO = ONLY SPI
MiniSD = ONLY SPI
MicroSD = ONLY SPI

Mode SPI operate:

MMC = Optional
RS-MMC = Optional
MMC-Plus = Optional
Secure-MMC = Necessary
SD = Necessary
SDIO = Necessary
MiniSD = Necessary
MicroSD = Optional

Regards
 

can anyone tell me how to write mmc interface code using SPI
in MPLAB using Library functions............???
 

I think macros to control the API or the registry directly
and then call it from where I need it.
As in the example below

Code:
#if defined (__PIC32MX__) //32 bits 

    static inline  __attribute__((always_inline)) void putcSPI(unsigned int data_out)
    { mSPI2BusyWait(); putcSPI2(data_out);}

    static inline  __attribute__((always_inline)) unsigned int getcSPI(void)
    { mSPI2BusyWait(); return getcSPI2();}

    //invoke API
    #define writeXSFHSPI(x)  putcSPI(x)
    #define readXSFHSPI(x)   x = getcSPI()

#else  //8 and 16 bits micro


    //8bits method with flush buffer
    #define writeXSFHSPI(x) \
                    FLASH_SSPBUF = x; \
                    while(!FLASH_SPI_IF); \
                    DummyMaster = FLASH_SSPBUF; \
                    FLASH_SPI_IF = 0

    //8bits method with flush buffer	
    #define readXSFHSPI(x) \
                    FLASH_SSPBUF =0; \
                    while(!FLASH_SPI_IF); \
                    x = FLASH_SSPBUF; \
                    FLASH_SPI_IF = 0


#endif


and the high-level source code remains the same

way around the web microchip There are many codes on the subject of memory cards

codes for compilers (Hi-Tech C) and (CCS)
https://www.microchipc.com/sourcecode/#mmc

AN1045
https://ww1.microchip.com/downloads/en/AppNotes/01045b.pdf

CODE
**broken link removed**

install the package, and looking at Microchip Solution-> Microchip-> MDD File System

the file "sd-spi.c"




regards.
 

Ignore all the comments above about what buses are supported by all the SD families.

The SPI-bus and 1-bit-SD-bus MUST be supported by ALL SD families: SD, SDHC, SDXC, SDIO.
Secure Digital - Wikipedia, the free encyclopedia (this is the english wikipedia page, which is completely different)

For most embedded designs, use SPI-bus. You should especially want to use a microcontroller that has a SPI peripheral that can support up to either 25MHz or 50MHz SPI clock rate.
 

Ignore all the comments above about what buses are supported by all the SD families.

The SPI-bus and 1-bit-SD-bus MUST be supported by ALL SD families: SD, SDHC, SDXC, SDIO.
Secure Digital - Wikipedia, the free encyclopedia (this is the english wikipedia page, which is completely different).

Hi Champion!
I read the two versions, Spanish and Inglés and the translation is perfect!

if you read more carefully, you would see that my post says the same.

the fact that there are open source standards achieved by reverse enginering, does not mean that anyone who manufactures hardware devices are free to implement SD without paying anything
and explained that this be implemented in embedded designs should be used in SPI mode and not to resort to sanctions.

Regards.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top