Compact flash library, Mikroc – ABL electronic PIC Microcontrollers PIC16 User Manual

Page 170

Advertising
background image

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 per-
formed directly, but successively through 512B buffer. Following routines can be
used for CF with FAT16, and FAT32 file system. Note that routines for file han-
dling can be used only with FAT16 file system.

Important! 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.

Cf_Init

Cf_Detect

Cf_Total_Size

Cf_Enable

Cf_Disable

Cf_Read_Init

Cf_Read_Byte

Cf_Read_Word

Cf_Write_Init

Cf_Write_Byte

Cf_Write_Word

Cf_Find_File

Cf_File_Write_Init

Cf_File_Write_Byte

Cf_Read_Sector

Cf_Write_Sector

Cf_Set_File_Date

Cf_File_Write_Complete

Function

Cf_Set_Reg_Adr

is for compiler internal purpose only.

mikroC - C Compiler for Microchip PIC microcontrollers

mikroC

making it simple...

162

MikroElektronika: Development tools - Books - Compilers

page

Compact Flash Library

Library Routines

Advertising
This manual is related to the following products: