FAT or FAT32

Coding and general discussion relating to user created compiler modules

Moderators: David Barker, Jerry Messina

Post Reply
Widgetman
Posts: 136
Joined: Sun Dec 16, 2007 7:39 pm
Location: Florida

FAT or FAT32

Post by Widgetman » Mon Dec 29, 2008 4:29 pm

Hi,
I ran into a issue with the SDFileSystem Library and I am not quite sure what is going on. It seems that if you have a SD Card formatted as FAT and try to read a file > 640K using the EOF marker that it quits when it reaches 640K. Is there a work around to this so that it will read a file past 640K ? I have tried it with the latest releases of the 4.xx Library
Thanks

Widgetman
Posts: 136
Joined: Sun Dec 16, 2007 7:39 pm
Location: Florida

Post by Widgetman » Mon Dec 29, 2008 4:33 pm

I forgot to mention that I am aware that FAT file size limitation is suppose to be 4GB. I am only seeing this using the SDFilesystem library, and when I stick my SD card into windows it sees the card and opens the file just fine. I am hoping it is just something silly I am doing.
Thanks

Limitations of FAT and ISO9660
As a information exchange format, FAT has these limitations:
The maximum file size is 4GB minus 1 byte, a serious limitation for video files.
The maximum volume size Windows XP can format is 32GB, very small compared to many removable hard drives.
Maximum about 4 millions files per volume.
Maximum 65,534 files per directory.
Does not support symbolic links.
Does not support hard links.
Does not support sparse files.
Does not support many attributes such as permission.
Does not support extended attributes.
Does not support long file names and unicode names natively.
Is not suitable for optical media.

User avatar
Steven
BETA Tester
Posts: 406
Joined: Tue Oct 03, 2006 8:32 pm
Location: Cumbria, UK

Post by Steven » Mon Dec 29, 2008 4:39 pm

Hi - could you post the code that you are using?

Widgetman
Posts: 136
Joined: Sun Dec 16, 2007 7:39 pm
Location: Florida

Post by Widgetman » Mon Dec 29, 2008 5:31 pm

Hi Steven,
I am pretty sure it is something stupid I am doing. Listed below is a sample code snippet that should work. I just wanted someone to give me a sanity check so I know where to go looking for my problem. I had switched over to the latest SD File Library, and started having issues. Unfortuneately I did not save the old SDFileSystem.bas file so I could not go back. Please take a look and let me know you agree I should be able to read past a filesize of 640K using the EOF marker.
Thanks


If SD.OpenFile("test.bin") = errOK Then
Repeat
ByteHolder = SD.ReadByte()
USART.Write(ByteHolder)
Until EOF
SD.CloseFile

Widgetman
Posts: 136
Joined: Sun Dec 16, 2007 7:39 pm
Location: Florida

Post by Widgetman » Mon Dec 29, 2008 5:35 pm

Hi Steven,
I forgot to mention I am using a 16F67J60 part at 25MHZ, and I am running 115200 N,8,1 on the Baud Rate. It is possible I am jamming characters out too fast so is there a way to detect when the TX buffer is truly empty so I know it is ok to send the next character ?
Thanks

Post Reply