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.

read/write on mmc card with PIC18fxx problems!!!can any one helps please...

Status
Not open for further replies.

farhani123

Newbie level 3
Newbie level 3
Joined
Mar 29, 2011
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,305
hello..
i need very urgently to find out how to read and write on a mmc card memory i'm running out of time and i need this to complete my project to take my engineering diploma, so can any one pleaaase help me to get out from this pb i'm realy stuck...
i use ccs c compiler..
i find out that i should use the spi protocole i tried to use some function predefined on the ccs c compiler but i failed to make any results:(((

help will be greatly appreciated

thank you
 

You'll find MMC/SD drivers in the CCS provided software examples and more in the CCS forum library section alomg with implementation suggestions. If you need advanced features like automatic detection of SDHC media, I would suggest the commercial driver from Brush
 
i'm realy grateful for your help, but on my ccs program i can't find this MMC/SD driver, i try to find it on the forum library..
 

i found the "mmc_spi" and the "mmcsd" drivers and i had tried to use functions such as "mmc_write_block(address, size, *ptr)" and"mmc_read_block(address, size, *ptr)" i made :address=0x00,size=512 and ptr="hello", in order to write "hello" in the block of 512byte wich start from the address 0x00.
the problem is when i simulate this in proteus isis and i use the spi debuger i see strange code that the PIC18f4520 send to the mmc card("ff ff ff ff ff ff ff ff") wich have nothing to do with the word i wish to send to the mmc in addition i found nothing on th mmc card when i read it with the function previously declared!!!!!
have you please fvm any idea what wrong with this??
Thanks in advance:)
 

Picking up on FvM's point. What is the manufacturer and exact model of the MMC you're using? The higher performance models and some of the MMC produced by off beat manufacturers have problems communicating with most sample or example programs. Have you tried a different MMC, like a Sandisk 1GB not SDHC?
 

on my ccs program i can't find this MMC/SD driver
I don't know, if you have a full ccs c version. mmcsd.c is in picc/drivers, ex_mmcsd.c in picc/examples.

It's normal operation, that a number of 0xff is written to the card during command initialization. Basically, you should either use a known working driver implementation and test code, or you can't avoid to go into the low level driver details.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top