Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

Help with proteus simulation for sd card

Status
Not open for further replies.

anhnha

Full Member level 6
Joined
Mar 8, 2012
Messages
322
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,298
Activity points
3,690
I am doing fatfs sample for sd card. I have created and compiled the example successful but I cannot simulation in proteus.
In the library Mr Chan also provide a schematic for sd connection. I want to simulate this circuit by proteus but it is not work. I use atmega64 in this example. Can anyone kindly help me make a proteus file .DSN to run the example.
Bellow are schematic that Mr Chan provied and my hex file .HEX with mmc file .mmc for simulation.
(If you need more information, please let me know)
 

Attachments

Last edited:

anhnha

Full Member level 6
Joined
Mar 8, 2012
Messages
322
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,298
Activity points
3,690
Could anyone help me? I did it but it doesn't work.
Maybe some suggestions?
 

anhnha

Full Member level 6
Joined
Mar 8, 2012
Messages
322
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,298
Activity points
3,690
Why don't you use mikroC Pro AVR?
I am not familiar with mikroC.
Now I am buiding sample provided by Mr ChaN. I compiled it well but when I simulation in proteus with the schematic above it doesn't work!
If the sample work then it is easy to adapt to my project!
 

Joined
Jul 25, 2012
Messages
1,192
Helped
170
Reputation
340
Reaction score
161
Trophy points
1,343
Activity points
0
I will check your project tomorrow. mikroC is nothing but C. It has Mmc and SPI library which you need for your project.
 

anhnha

Full Member level 6
Joined
Mar 8, 2012
Messages
322
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,298
Activity points
3,690
Thank you,
In my attached file, there are only .HEX and .mmc file. Because my DSN is not work I don't send it.
Hope you can help me create a DSN in proteus with atmega64 like the picture above.
As for .HEX file it is a sample project therefore I think that it will work well.
 

Joined
Jul 25, 2012
Messages
1,192
Helped
170
Reputation
340
Reaction score
161
Trophy points
1,343
Activity points
0
It's OK. I will check you proteus design. send it.

I don't see any signals on pins SCK, MISO, MOSI, and SS.
 
Last edited:

alexan_e

Administrator
Joined
Mar 16, 2008
Messages
11,895
Helped
2,021
Reputation
4,158
Reaction score
2,031
Trophy points
1,393
Location
Greece
Activity points
64,377
Why don't you use mikroC Pro AVR?
I'm getting sick and tired of all these recommendations about microC and it might not cost you anything because you are using a "free" version (that is clear by now) but you either ask others to pay a bunch of money to buy the application without reason since winavr is free or you push them to follow your "free" path which is as bad.
 

Joined
Jul 25, 2012
Messages
1,192
Helped
170
Reputation
340
Reaction score
161
Trophy points
1,343
Activity points
0
Is WinAVR a compiler? I use only PIC and mikroC Pro PIC.
 

anhnha

Full Member level 6
Joined
Mar 8, 2012
Messages
322
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,298
Activity points
3,690
@alexan_e:
Please don't make requests for help in private using PM. Create a thread in the forum so that other members can benefit from the posted answers.
Thank for remind,
I get it now and will do it.
@internetuser2k12:
Is WinAVR a compiler? I use only PIC and mikroC Pro PIC.
Yes, but I have send HEX file, now it is only need an DNS file.
 

alexan_e

Administrator
Joined
Mar 16, 2008
Messages
11,895
Helped
2,021
Reputation
4,158
Reaction score
2,031
Trophy points
1,393
Location
Greece
Activity points
64,377

bigdogguru

Administrator
Joined
Mar 12, 2010
Messages
9,831
Helped
2,348
Reputation
4,690
Reaction score
2,274
Trophy points
1,413
Location
Southwest, USA
Activity points
62,506
What is really a shame in this case, there have been 8 replies concerning the choice of compiler, which has NOTHING to do with anhnha's original post.

I agree with Alex, why someone would choose to use an inferior compiler, IMHO, over a freely available and well supported version of GCC is beyond me.


However, back to the OP's question, I have found the following 4 part tutorial covers AVR SD/MCC interfacing and FAT quite well:

Simple FAT and SD Tutorial Part 1

The author, jokkebk, of the tutorial is actually a member of this forum.


BigDog
 

Joined
Jul 25, 2012
Messages
1,192
Helped
170
Reputation
340
Reaction score
161
Trophy points
1,343
Activity points
0
For what clock frequency did you compiled the code for? Are you using ext or int oscillator?
 

Joined
Jul 25, 2012
Messages
1,192
Helped
170
Reputation
340
Reaction score
161
Trophy points
1,343
Activity points
0
9.216 MHz? Compile the code for 8 MHz and zip and post the hex file. Is it external oscillator?
 

anhnha

Full Member level 6
Joined
Mar 8, 2012
Messages
322
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,298
Activity points
3,690
It is system clock, F_CPU = 9.216 MHz.
 

anhnha

Full Member level 6
Joined
Mar 8, 2012
Messages
322
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,298
Activity points
3,690
Fosc = 9.216 MHz. This is a sample written for atmega64.
Here is an image about schematic. Fosc in this circuit is 9M216
 

Attachments


Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top