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 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,684
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

  • avr_mmc.png
    avr_mmc.png
    11 KB · Views: 114
  • simulation.rar
    29 KB · Views: 97
Last edited:

Could anyone help me? I did it but it doesn't work.
Maybe some suggestions?
 

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!
 

I will check your project tomorrow. mikroC is nothing but C. It has Mmc and SPI library which you need for your project.
 

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.
 

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:

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.
 

Is WinAVR a compiler? I use only PIC and mikroC Pro PIC.
 

@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.
 

WinAVR can be found **broken link removed** and can be use with AVR studio as a graphic IDE.
AVR studio 6 already includes its own spin of the GCC and tools

Well, this is a thread about a project using an AVR mcu so your recommendation was for mikroC Pro PIC ?
 

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
 

Physical drive nmuber
Bellow is DSN that I used. But this file is where my problem is!
 

Attachments

  • SD_card.rar
    16.6 KB · Views: 83

For what clock frequency did you compiled the code for? Are you using ext or int oscillator?
 

9.216 MHz? Compile the code for 8 MHz and zip and post the hex file. Is it external oscillator?
 

It is system clock, F_CPU = 9.216 MHz.
 

Fosc = 9.216 MHz. This is a sample written for atmega64.
Here is an image about schematic. Fosc in this circuit is 9M216
 

Attachments

  • avr_mmc.png
    avr_mmc.png
    11 KB · Views: 101

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top