Mikroelektronika MIKROE-350 Fiche De Données

Page de 526
COMPACT FLASH LIBRARY
The Compact Flash Library provides routines for accessing data on Compact Flash
card (abbr. CF further in text). CF cards are widely used memory elements, com-
monly used with digital cameras. Great capacity and excellent access time of only
a few microseconds make them very attractive for the microcontroller applications.
In CF card, data is divided into sectors. One sector usually comprises 512 bytes.
Routines for file handling, the Cf_Fat routines, are not performed directly but suc-
cessively through 512B buffer.
Note: Routines for file handling can be used only with FAT16 file system.
Note: Library functions create and read files from the root directory only.
Note: Library functions populate both FAT1 and FAT2 tables when writing to files,
but the file data is being read from the FAT1 table only; i.e. there is no recovery if
the FAT1 table gets corrupted.
Note: If MMC/SD card has Master Boot Record (MBR), the library will work with the
first available primary (logical) partition that has non-zero size. If MMC/SD card has
Volume Boot Record (i.e. there is only one logical partition and no MBRs), the library
works with entire card as a single partition. For more information on MBR, physical
and logical drives, primary/secondary partitions and partition tables, please consult
other resources, e.g. Wikipedia and similar.
Note: Before writing operation, make sure not to overwrite boot or FAT sector as it
could make your card on PC or digital camera unreadable. Drive mapping tools,
such as Winhex, can be of great assistance.
189
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6