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

SD Card Questions

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



Joined: 30 Apr 2009
Posts: 16

View user's profile Send private message

SD Card Questions
PostPosted: Wed Oct 13, 2010 2:26 am     Reply with quote

Hi there ,

I have a few questions with regard to writing to SD and FAT16 formatting.
I need to build a device which is capable of logging RF data to an SD card such as RSSI message length type etc. Generally the data doesnt need to stored vey frequently, maybe every few minutes, but there will be some scenarios where i will need to log 100's of bytes per second.

My question is how long does it take for the built in CCS FAT16 formatting functions to append data to a text file on the SD card. Could somebody give me a figure here in us per byte or something ?

Also how much program memory will I need on my PIC to include these FAT16 libraries ?
Also would it be worth using a PIC24F because of its 16bit architecture to speed up the FAT16 formatting ? I aim to run at 8MIPS be it on an 18F or a 24F.
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: Wed Oct 13, 2010 3:17 am     Reply with quote

I do not know the performance envelope of the CCS driver but here are general answers.

With careful application development, it is possible to record data rates of 100K bytes per second. Achieving data rates of 10K bytes per second is straight forward.

The size of the code naturally varies depending on the functions actually called as the CCS compiler only includes code for functions actually called. For my drivers I allow around 12K to 16K of program memory. The amount of RAM required depends on the number of simultaneous open files and whether you are concerned about RAM size or maximum performance.

Code:
The LITE mode shares a single 512 byte read/write buffer between the file system and all open files and is capable of supporting hundreds of files open concurrently. For high performance applications that require two or more files open concurrently, the standard mode is recommended

     RAM requirements:         Standard           Lite
     File System overhead        560              560
     Per File Overhead           540               38


Generally byte wide operations are used in the file system and as such there is not a lot of difference in the performance between a 16 bit processor and an 8 bit processor. When you factor into account the actual performance is really limited by the SPI speed so if both PICs operated the SPI bus at the same speed the performance difference would be minor. However a PIC24 is capable of running the SPI bus at twice the speed of a PIC18 processor for the same clock speed.

As mentioned, RAM is key consideration. I generally recommend to customers planning to developed FAT based applications on the PIC18F family to go for PICs with 3900 bytes of RAM, such as the PIC18F4620. It is easier with the PIC24 as most variants offer significantly more than their PIC18F counterparts.
_________________
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