Print FAT table in a compact flash ??????????

Apr 12, 2006 2 Replies

Hi Im trying to access the FAT table in a compact flash. from what i have understood



i have got sandisk 256mb compact flash



compact flash memory starts with


- a boot sector of 512 bytes



- then FAT 1 of 512 bytes



- FAT 2



- Data


i want to print the FAT table



how iam i doing that is like this



Read a sector using LBA mode set command register to 0x20 and then i need to give LBA logical block address LBA usually starts from 0 so i assumed that LBA for FAT table is gonna be at address 1 so i gave LBA address as 1



this program is made of assumptions and the program is not working



CAN ANYONE TELL ME HOW TO PRINT THE FAT TABLE FROM MY COMPACT FLASH ???????????????



There may be reserved sectors between the boot sector and fat1.

formatting link
has lots of good information. I found it with google "compact flash partition table"

Alan Nishioka

First off, you need to set the parameter registers (sector count, the the LBA registers (aka cylinder lo, cylinder hi and sector, and the drive/head register) BEFORE you issue the read sector command. The command uses the values present in the registers at the time the command is issued.

The location of the FAT table depends on the file system under which the CF was formatted. The FAT is not an inherent characteristic of a CF card, rather it is data written to the card when the card is formatted.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required