Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 18, 2024, 09:06:55 21:06


Login with username, password and session length


Pages: [1]
Print
Author Topic: FAT16 is the file into the SD but I can not turn on PC  (Read 4989 times)
0 Members and 1 Guest are viewing this topic.
thenorthstar
Newbie
*
Offline Offline

Posts: 9

Thank You
-Given: 2
-Receive: 0


« on: May 15, 2011, 04:06:09 16:06 »

hello friends;
I tried it with 18f4620 .I'm using 256 MB SD Card.
running smoothly in proteus, 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

Please help me?
Logged
pickit2
Moderator
Hero Member
*****
Offline Offline

Posts: 4647

Thank You
-Given: 826
-Receive: 4207


There is no evidence that I muted SoNsIvRi


« Reply #1 on: May 15, 2011, 04:30:55 16:30 »

did you format the SD card in Fat32, and can you use it in a card reader.
Logged

Note: I stoped Muteing bad members OK I now put thier account in sleep mode
Wizpic
Global Moderator
Hero Member
*****
Offline Offline

Posts: 1196

Thank You
-Given: 540
-Receive: 408



« Reply #2 on: May 15, 2011, 05:15:19 17:15 »

I don't use C but in my SD logger I first created a .CSV format remove card and then put it in PC and open the file that way, PDS lets you save it in TXT/CSV format but if you try XLS is becomes coruppt.
Logged

When you think, "I can't do anymore. I need a break," that is the time to challenge yourself to keep going another five minutes. Those who persevere for even an extra five minutes will win in life..
thenorthstar
Newbie
*
Offline Offline

Posts: 9

Thank You
-Given: 2
-Receive: 0


« Reply #3 on: May 16, 2011, 06:30:37 06:30 »

Sample.txt also created.But, again gave the same error.
Logged
gan_canny
Junior Member
**
Offline Offline

Posts: 89

Thank You
-Given: 101
-Receive: 26


« Reply #4 on: May 16, 2011, 01:58:50 13:58 »

The SPI interface on a SD card is fast you need pull ups since the card is open drain. If the pic is at 5v you will need level conversion to 3.3v for the SD card. Use a resistor ladder or a fast interface ( several years ago I used a 7407 today the 74xx125 might be better). Simulation is merely an illusion. It helps you get the illusion you want but it is courageous to believe that the electrons moving in a real circuit will behave exactly as your illusion might lead you to believe. Now a simulation does help you get the traces reasonably correct which saves having to cut and fix them on a real PCB plus you need the schematic anyway. I'd start with a basic interface and get the PIC to send a command and read the SD ID. You'll probably be running the card in MMC mode so the command set is restricted.  
Logged
LabVIEWguru
Senior Member
****
Offline Offline

Posts: 300

Thank You
-Given: 270
-Receive: 593



« Reply #5 on: May 16, 2011, 03:40:02 15:40 »

 I do not know about the PIC. When I have used the SPI with other processors I have done the following:
Set up registers - reduce speed to minimum
Is the mode set correctly? (0,0  0,1  1,0  1,1)
Do you have access to an oscilloscope? Can you look at the SPI waveform on an oscilloscope?
Like the gentleman above me said, if you are sure all these are good, try to read the hardcoded device ID. If the waveforms look good and your mode and speed are OK, the problem is your code.

I have had problems before trying to level-shift or isolate the SPI. It distorted the signals so much the device I was talking to couldn't see the SPI waveforms.

I had problems with an Atmel flash memory device that I was *sure* must work. Then I found an Atmel application note that showed at high speed I needed 100 pf caps on the SPI lines (at the device) to keep noise down. Worked great after that.

As mr. gran_canny said, go back and make sure you can read the device ID of the SD card first.

(later thought) Are you using one of the SD cards that want a command with a password sent for reading and writing?

Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC