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 support@ccsinfo.com

mmc read file larger then 512 bytes

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



Joined: 17 Aug 2007
Posts: 1

View user's profile Send private message

mmc read file larger then 512 bytes
PostPosted: Wed Aug 22, 2007 9:32 am     Reply with quote

I need help reading file larger than 512 bytes.
I can only read the first 512 byte block. How can I get second block?
How can I get whole file (which is larger than 512 bytes) printed to serial port?
Please help.
Thank you.


Last edited by Dmitriy on Wed Aug 22, 2007 12:07 pm; edited 1 time in total
Douglas Kennedy



Joined: 07 Sep 2003
Posts: 755
Location: Florida

View user's profile Send private message AIM Address

PostPosted: Wed Aug 22, 2007 11:08 am     Reply with quote

Blocks are about the MMC card. Read the specifications of the MMC card to see how to read data and advance into the MMC memory. FAT is a patented design by Microsoft. There is FAT documentation from Microsoft in the public domain and with Microsoft's permission you can if you pay them use their FAT design. Discussing FAT in specific terms without Microsoft's prior permission could encourage legal action by them to support their patent. In broad terms the data space on the MMC is organized by FAT into clusters each of the same size. A file represents a linked list of clusters. To find the head of the a files linked list two duplicate FAT tables are used. The name of the file is resolved by these tables to a cluster address which in turn is resolved into a physical MMC block address by multiplication and the addition of offsets.

Last edited by Douglas Kennedy on Wed Aug 22, 2007 11:23 am; edited 1 time in total
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Aug 22, 2007 11:14 am     Reply with quote

Merely discussing the FAT file system on a web board is going to bring
lawyers down on me ? I don't think so.
Douglas Kennedy



Joined: 07 Sep 2003
Posts: 755
Location: Florida

View user's profile Send private message AIM Address

PostPosted: Wed Aug 22, 2007 11:36 am     Reply with quote

PCM programmer takes a calculated position. It is rather like speeding on a desert highway. It's unlikely you'll get caught but speeding is speeding. If PCM programmer had the patent you would think he wouldn't want anyone circumventing it or helping others to circumvent it. Hacking a fully owned design isn't wholesome. Frankly I think this patent was incorrectly approved I also think speed limits should be higher on desert highways but I still expect a ticket if I ever did. Ironically PCM programmer has taught me more than I ever imagined about PIC's so I'm almost embarrassed to disagree with him .
ckielstra



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

View user's profile Send private message

PostPosted: Wed Aug 22, 2007 3:58 pm     Reply with quote

Code examples for MMC and FAT32 can be found on the web and in the code section of this forum.
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