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
Posted: Wed Aug 22, 2007 11:08 am
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
Posted: Wed Aug 22, 2007 11:14 am
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
Posted: Wed Aug 22, 2007 11:36 am
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
Posted: Wed Aug 22, 2007 3:58 pm
Code examples for MMC and FAT32 can be found on the web and in the code section of this forum.
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