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

Micro sd interface with pic18f

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



Joined: 03 Feb 2012
Posts: 29

View user's profile Send private message

Micro sd interface with pic18f
PostPosted: Tue Feb 05, 2013 4:01 am     Reply with quote

Haiiiiiiiii,

I have used fat.c file available in the ccs drivers and programmed the 2 GB micro SD card and it is working fine. When I make a file it is created and data is appended into the file using the functions available in ex_fat.c file in ccs. But the data appended into the file is limited to few bytes or characters... If I append large data into the file,the data is corrupted and only few words (data) are appended and the same are repeated 3-4 times..

How can I increase the file size to read/write the exact size data from/to the file??.

#define MAX_FILE_NAME_LENGTH 0x20 // the maximum length of a file name for our FAT, including /0 terminator
#define STREAM_BUF_SIZE 0x20 // how big the FILE buffer is. 0x20 is optimal

I have these 2 lines but if I change this number the file is getting corrupted when read from PC.

Please help me in writing huge data to the file.
ckielstra



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

View user's profile Send private message

PostPosted: Tue Feb 05, 2013 4:23 pm     Reply with quote

Please don't start a new thread when you already have one on the same topic. I will reply in your original topic.
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