View previous topic :: View next topic |
Author |
Message |
thenorthstar
Joined: 06 Mar 2010 Posts: 24
|
FAT16 Problem |
Posted: Fri May 13, 2011 1:22 am |
|
|
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
|
|
Posted: Fri May 13, 2011 12:10 pm |
|
|
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
|
|
Posted: Sat May 14, 2011 12:45 pm |
|
|
Please help me |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun May 15, 2011 5:34 pm |
|
|
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
|
|
Posted: Sun May 15, 2011 11:27 pm |
|
|
Is the SD card connection is the problem? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon May 16, 2011 1:04 pm |
|
|
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. |
|
|
|