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.

Problem with MMC card initialization in Proteus

Status
Not open for further replies.

harish.n.j

Junior Member level 2
Junior Member level 2
Joined
Dec 15, 2009
Messages
23
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
coimbatore
Activity points
1,437
Hi all,
i am planning to work with data storing in mmc card, am using PIC controller. I have even Driver which is provided by CCS. but when i try to simulate with Proteus. while designing circuit , it asks for image file, i have no idea about it ? , i have come across a similar thread asking this imag file, but it dont seems to be providing a right solution for me
wat are the initial parameters must be done to use MMC card with Proteus?


thanks in advance !
 

Re: sd card doubt

Attached is image file.
Rename it with extension ".mmc" as edaboard does not allow to upload a file with this extension so i changed its extension.
 

Re: sd card doubt

probably it could not be attached,if u give me your email i can send u the file
 

Re: sd card doubt

Thanks waqas, I have sent u my email address to ur personal message.

could anyone provide me some link to any sample application regarding using proteus sd card
 

Re: sd card doubt

Card image file sent to your email.
I would suggest u to use mikroC compiler.It has example code for interfacing with SD card and schematic too.
 

    harish.n.j

    Points: 2
    Helpful Answer Positive Rating
Re: sd card doubt

am searching for a link to download MikroC found a link but its 14 MB size but it does not contain any examples, it would be great if u provide the link where i can download the examples... thanks waqas for ur quick reply !
 

Re: sd card doubt

hey waqas thanks a lot man !

but does this file contains library files also
 

Re: sd card doubt

hey waqas, thanks man this mikro C seems to be gr8, and the other prgms along with it seems to be rocking.. am going to work on it this weeknd . :D
 

Re: sd card doubt

Disable antivirus.
have you provided a resistive voltage divider between controller and SD card???
most MCUs work on 5 v while sd card work on 3.3 v so you need a voltage divider.
 

Re: sd card doubt

ya i have added resistence to drop the voltage.. i have uploaded the proteus model below

 

Re: sd card doubt

you will be surprised to see my answer :p
dont use resistive network in proteus but always use it in actual hardware.
Attach MCU and sd card directly in proteus
 

Re: sd card doubt

i removed the resistence . but still the same response is there any mistake in SPI initialisation
 

Re: sd card doubt

I think u r checking if initialized properly by displaying "u" on usart terminal.Have u set usart terminal to 19200 in proteus too?? if not right click on it and set it
I recommend to use slowest baud rate for testing like 600(in both, coding and in proteus)

Added after 9 minutes:

Another important point ,u should use same clock rate in mikroC and in proteus.In proteus right click the processor and set its clock speed,proteus do not simulate external crystal attached to processor.
 

Re: sd card doubt

ya i get the reply from the terminal. as "UWi". what may be wrong
 

Re: sd card doubt

no, actually my problem is with SD card initialization. i never had pblm with serial communication.
as per the program if the reply is "Ui" or "i" then the it means SD card is initialized but the reply i get is "UWi", which means Init() function does not return 0, which means initialization is not done correctly

what might be causing this problem
 

Re: sd card doubt

this is because you are only checking if card is initialized,if not you go forward.
try this
while(mmc_fat_init(&PORTC,2)) ;
The program counter will stay here untill initialized
 

Re: sd card doubt

Hey waqas thanks for your gr8 support, actually i tried as u said with the while loop but it was repeatedly printing WWWWWWWWW continuously, anyhow i solved the problem by modifying the example project file as per my code. it worked !. thanks a lot man u had provided me a good start !
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top