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

FAT16 Problem

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
thenorthstar



Joined: 06 Mar 2010
Posts: 24

View user's profile Send private message

FAT16 Problem
PostPosted: Fri May 13, 2011 1:22 am     Reply with quote

hello my friend;
I tried the following program I tried it with 18f4620 .
I'm using 256 MB SD Card.
Proteusta running smoothly, but I did the circuit does not work.






Is the SD Card files, but gives the following warning when I open the files on the PC.



I could not find where I'm wrong. Can you help? Please



My Code:
http://www.4shared.com/file/ZTNDdooy/SD_Fat16.html
Nepersky



Joined: 10 May 2011
Posts: 15

View user's profile Send private message

PostPosted: Fri May 13, 2011 12:10 pm     Reply with quote

I am not really sure, but I think you only have a pull-up resistor on the Dout pin of your SD card. Am I right?
When I built my last SD card circuit I also had pull-ups on Din and CS lines.
thenorthstar



Joined: 06 Mar 2010
Posts: 24

View user's profile Send private message

PostPosted: Sat May 14, 2011 12:45 pm     Reply with quote

Please help me
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun May 15, 2011 5:34 pm     Reply with quote

I think asmallri told you to look at sample schematics on his web page.
You should do it. Look at the circuit at the bottom center of the
schematic. He has voltage dividers consisting of 1.8K / 3.3K resistors
going to the \CS, SCK, and DI pins on the SD card. Then he as a 15K
pullup and a 74ACT125 connected to DO on the SD card. (You can also
use 74AHCT125). Here is the schematic from his page:
http://www.smallridge.com.au/download/BE_Reference_Design_PIC18F2620_ENC28J60.zip
thenorthstar



Joined: 06 Mar 2010
Posts: 24

View user's profile Send private message

PostPosted: Sun May 15, 2011 11:27 pm     Reply with quote

Is the SD card connection is the problem?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon May 16, 2011 1:04 pm     Reply with quote

Code:

#use spi(MASTER,BITS=8,MODE=3,FORCE_HW,stream=SDCard)

   SETUP_SPI(SPI_MASTER|SPI_CLK_DIV_64|SPI_H_TO_L|SPI_XMIT_L_TO_H );


   SETUP_SPI(SPI_MASTER|SPI_CLK_DIV_64|SPI_H_TO_L|SPI_XMIT_L_TO_H );


Your program has 3 different SPI setup lines in it. This is just crazy to me.
I don't want to work on this any more. I'm quitting.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
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