mikroC
making it simple...
Mmc_Fat_Init
Prototype
unsigned short Mmc_Fat_Init(unsigned short *port, unsigned short
pin);
Returns
Returns 0 if MMC card is present and successfully initialized, otherwise returns 1.
Description
Initializes hardware SPI communication; designated CS line for communication is RC2.
The function returns 0 if MMC card is present and successfully initialized, otherwise
returns 1.
This function needs to be called before using other functions of MMC FAT library.
Example
// Loop until MMC FAT is initialized at RC2
while (Mmc_Fat_Init(&PORTC, 2)) ;
Mmc_Fat_Assign
Prototype
void Mmc_Fat_Assign(char *filename);
Description
This routine designates ("assigns") the file we'll be working with. Function looks for the
file specified by the
tialize it by getting its start sector, size, etc. If the file is not found, an empty file will be
created with the given name. The
Requires
Library needs to be initialized; see
Example
// Assign the file "EXAMPLE1.TXT" in the root directory of MMC.
// If the file is not found, routine will create one.
Mmc_Fat_Assign("EXAMPLE1TXT");
MikroElektronika: Development tools - Books - Compilers
mikroC - C Compiler for Microchip PIC microcontrollers
in the root directory. If the file is found, routine will ini-
filename
must be 8 + 3 characters in uppercase.
filename
Mmc_Fat_Init
.
page
227
Need help?
Do you have a question about the PIC Microcontrollers PIC12 and is the answer not in the manual?