CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

SD card question
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
theasus



Joined: 31 May 2009
Posts: 79

View user's profile Send private message

PostPosted: Fri Mar 12, 2010 7:49 am     Reply with quote

I have changed my circuit But I'm not sure is it true?Do we need pull up resistor for implementing EX_SDMMC example?

ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Fri Mar 12, 2010 9:05 am     Reply with quote

This new schematic is even worse than the original one:
- You have connected SDI of the PIC to DI of the MMC, this should be DO. The connection should be a 'cross'.
- Pull-up resistors are missing. This creates problems in the startup of the MMC card when the outputs are open collector (they become normal outputs in a later stage).
- The DO of the MMC delivers 3.3V to the 5V PIC but this is not high to trigger the PIC input. In simulation it most likely will work, but in the real world you will get complaining customers. A voltage level conversion should be inserted here. For example, Andrew uses a 74ACT125D in his Reference Design schematics.

Why not choose the easy solution and set the PIC to run at 3.3V? Then no interface glue components are required.

The PIC18F452 is not recommended for new designs. Andrews suggestion for the PIC18F4620 has more memory, is cheaper and runs max. 25MHz at 3.3V. Additional benefit is you'll be saving some power, good for the environment. Wink

I also suggest you study Andrew's website for code and schematics (Ethernet Reference design, e.a.).
theasus



Joined: 31 May 2009
Posts: 79

View user's profile Send private message

PostPosted: Fri Mar 12, 2010 12:22 pm     Reply with quote

I can't use 3.3Volt for my pic because I drive Graphic Lcd, too. I have fixed my circuit. I have added pull-up resistor. But the supply voltage of pull-up resistor is different. And this is my schematic:
If this is not true,Could you send me the correct hardware connections for this operation?(The supply voltage will be 5 volt.Also included pull-up resistor) I couldn't use EX_MMCSD example in real hardware.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Mar 12, 2010 12:35 pm     Reply with quote

Your voltage dividers are wrong. They won't reduce the voltage.
They need to be like this:
Code:

From PIC >---
(5v CMOS    |
levels)     <
            > 1.8K
            <
            |
            o-------> To MMC card
            |         (3.3v CMOS levels)
            <         
            > 3.3K
            <
            |
           ---
            - GND
theasus



Joined: 31 May 2009
Posts: 79

View user's profile Send private message

PostPosted: Fri Mar 12, 2010 1:58 pm     Reply with quote

Here is my circuit I have fixed as you said.I think it seems true.But I'm not sure about pull-up resistors voltage.

PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Mar 12, 2010 3:26 pm     Reply with quote

It was recommended to you, to go look at asmallri's web page
for the PIC to SD Card interface schematics. Please go to
this link:
http://www.smallridge.com.au/download/BE_Reference_Design_PIC18F4620_ENC28J60.zip
Look in the lower left corner of page 3 of the PDF file. It shows all
the resistors and the level translator chip.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group