[SOLVED] PIC18F8722 & Micro SD Card 512MB

Status
Not open for further replies.

moahrs

Junior Member level 2
Joined
Dec 29, 2011
Messages
20
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,459
Hi all,

I am using pic18F8722, c18 compiler and MPLAB 8.88. Using C18 lib (SPI).

I am a problem to use a Micro SD Card 512MB. The code I put below. The problems are 2 (I think they are related).

1) In the second part, when I remove MicroSD from idle (After CMD0), that I send one ACMD41 (The CMD1 not works in any case), the MicroSD leaves from idle, but after near 25 seconds.... its normal ?

2) in the third part, I sendthe CMD16, to change block size to 512B. In this part, the response is not 0x00, is another.

you guys can take a look at my code and see if there's anything I'm doing wrong ?

I take this code from another site. I not using MDD sample from Microchip because I Need to put, in this microcontroller, tcp/ip and fat mmc controler, and the TCP/IP stack + MDD FS not work together, and the sample TCP/IP with MDD not have to PIC18 (only to PIC24 and above).

And I know if I remove lot's of code that I not need, the TCP/IP and FAT mmc controler will work fine.

Its not complicate for me, I just do FAT in another projects (more simple), and works fine. My only problem is comunicate with MicroSD Card.




Ty a Lot
Moacir Jr.
 

I'm abandoning this idea.... I cant get help, and I am lost... I'm not complaining, just explaning.

Can close this thread.



Ty a lot.
Moacir Jr.
 

One of my personal suggestion..

Download Microchip Application Libraries and Use its MDD Library..

Few days i had implemented that and it works fine.

Even examples are available for PIC18F8722, and FAT16 and FAT32 Format Both are supported.
I don't much about these but had simulated everything on proteus properly..

Just give a try..
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…