Datasheet
Programming PIC Microcontrollers in BASIC - mikroElektronika
5.2.5 Compact Flash Library
Compact Flash Library provides routines for accessing data on Compact Flash card (abbrev. CF further in text). CF cards are
widely used memory elements, commonly found in digital cameras. Great capacity (8MB ~ 2GB, and more) and excellent access
time of typically few microseconds make them very attractive for microcontroller applications.
In CF card, data is divided into sectors, one sector usually comprising 512 bytes (few older models have sectors of 256B). Read
and write operations are not performed directly, but successively through 512B buffer. Following routines can be used for CF with
FAT16 and FAT32 file system.
Note: routines for file handling (CF_File_Write_Init, CF_File_Write_Byte, CF_File_Write_Complete) can
be used only with FAT16 file system, and only with PIC18 family!
Before write operation, make sure you don’t overwrite boot or FAT sector as it could make your card on PC or digital cam
unreadable. Drive mapping tools, such as Winhex, can be of a great assistance.
5.2.5.1 CF_Init_Port – Initializes ports appropriately
http://www.mikroelektronika.co.yu/english/product/books/picbasicbook/05.htm (42 sur 112)05/11/2004 02:20:52