This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Diff between File system and FAT file system

Hi to all, i started to work on FAT file system on SD 1GB card. LPC2388 on MCB2300 board.

Just now i have completed my binary search on File system on SD card. Simply fopen, fread, fseek,etc.

Now i have to work on SD card using FAT file system. i went through so many web pages that didnt answer my question or i was not able to understand.

how to make a File allocating table on my SD Card? Some simple example can give me a good start...

my question is Whats the difference between Normal File system (which i have done on my SD card) and FAT File system?

And I had formatted the SD card on LAPTOP with the 2 options of FAT(Default) and FAT32.
When i tried to use the card after i did format using FAT(Default) option, i was able to work with my code which i developed for SD card using normal File system.

But if format using FAT32 option, then while trying to initialize the card it says SD card un formatted.

So what its trying to say?

So by default my controller accept FAT12?

Can i use FAT32 on the same SD card for my same code in which i didnt give an option to recognize FAT32?

As i studied from the web source for FAT16, the clusters address divide my SD card in to sectors and gives back the location address to me(2^16 address)?

So on for FAT32?

So please give me some clear explanation how to start? And i gone through Wikipedia and all the sources so dont give me the link for wikipedia pls.

Parents
  • FAT12, FAT16 or FAT32 are basically the same thing. The big difference is how many bits that are used in each FAT entry, to point at a usable cluster. With 12 bits, you can not have more than 4096 clusters. With 16 bits, you can have at most 65536 clusters. With 32 bits, you can have 2^32 clusters.

    For a large memory card, you will either need to have few but large clusters, or switch to a version of the FAT file system that has more bits to address many smaller clusters.

    You can write code that autodetects if a memory card has FAT12, FAT16 or FAT32. I really do thing you should return to the wikipedia pages and read them again - and possibly a third time. If you are going to implement your own FAT code, then you must understand how the FAT file system works. How to detect the file-system parameters (such as FS type, cluster size, ...) How to locate a primary and secondary FAT. How to locate the root directory. How to translate a directory entry into a chain if clusters. How to compute the address of these clusters to retrieve the data. How to differentiate between used and unused clusters (in case you need write support).

Reply
  • FAT12, FAT16 or FAT32 are basically the same thing. The big difference is how many bits that are used in each FAT entry, to point at a usable cluster. With 12 bits, you can not have more than 4096 clusters. With 16 bits, you can have at most 65536 clusters. With 32 bits, you can have 2^32 clusters.

    For a large memory card, you will either need to have few but large clusters, or switch to a version of the FAT file system that has more bits to address many smaller clusters.

    You can write code that autodetects if a memory card has FAT12, FAT16 or FAT32. I really do thing you should return to the wikipedia pages and read them again - and possibly a third time. If you are going to implement your own FAT code, then you must understand how the FAT file system works. How to detect the file-system parameters (such as FS type, cluster size, ...) How to locate a primary and secondary FAT. How to locate the root directory. How to translate a directory entry into a chain if clusters. How to compute the address of these clusters to retrieve the data. How to differentiate between used and unused clusters (in case you need write support).

Children
No data