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

HELP to write in SD card

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



Joined: 02 Sep 2005
Posts: 5

View user's profile Send private message

HELP to write in SD card
PostPosted: Fri Jun 08, 2007 5:35 pm     Reply with quote

Hi.
Im working in projetc to university, more im have dificults to configure PIC 18F4580-I/P.

My problem now is a comunication the PIC and SD card.

Im need record information the sensor in to SD card.

If possible help me, im need one code for the PIC --> WRITE --> SD card.

Im need only WRITE the data in the card.

My codes exemples and testes is bad working.

The format is a FAT 16.

if possible help me from a Library and a exemple the WRITE data to SD card.

10x very much
email -> [email protected]
asmallri



Joined: 12 Aug 2004
Posts: 1635
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Fri Jun 08, 2007 7:42 pm     Reply with quote

There are a couple of ways to deal with this. You could implement the FAT file system on the PIC. If you want to buy a FAT system driver then check out my web site.

An alternative solution is to format the SD card with FAT16 and create a single large empty file on the card in the root directory. Your PIC software needs enough intelligence to locate the directory and locate the file (first entry in the FAT16 directory) to determine the start sector of the file. Your PIC software can now write sequential sectors starting at the first sector of the file. This is far simpler than implementation a full FAT.

When you have finished logging data you can remote the card and read it on a PC. Before you can use the card with the PIC again you will have to reformat the card and create the dummy file again.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
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