sachink321@gmail.com wrote:
> Thanks, that helps
>
> i have already gone through CF spec
> but one thing tht troubles me is this
>
> lets suppose there are some files already in a compact flash
> im trying to read those files
> how will i know at which adresss or at which sector number or LBA is
> tht particular file???
> once i know tht particular LBA
> i can acceess using read sector commmand
> But how will i knw which Sector is tht particular file????
>
That's what a file system does for you. You need to store a table
somewhere that has the file information. Normally, this is done with a
file allocation table or similar in a known place on the storage device.
It could also be stored off the device somewhere in the host. If you
are doing a data recorder, which was the impression I had, you wouldn't
need separate files and could assume the data jsut starts at the
beginning of the device. If you are going to be reading existing files,
then you need to know how the CF is formatted so that you can find and
interpret the file tables.