xpress_embedo
Advanced Member level 4
- Joined
- Jul 5, 2011
- Messages
- 1,154
- Helped
- 161
- Reputation
- 396
- Reaction score
- 189
- Trophy points
- 1,353
- Location
- India
- Activity points
- 10,591
Just experimenting with Microchip Application Library for MDD File System SD Card..
I am using Proteus and PIC18F8722 Micro-Controller.
Created a file and write some text in that file..
all works properly without any problem.
But FSformat command is creating problem..
Here is my Main Code:-
The code which is commented out is working properly, but when i am trying to use format command it is not working.
MPLAB is giving error upon compilation
Error - could not find definition of symbol 'FSformat' in file 'Object - MDD File System-SD Card\My_Main.o'.
Please help
I am using Proteus and PIC18F8722 Micro-Controller.
Created a file and write some text in that file..
all works properly without any problem.
But FSformat command is creating problem..
Here is my Main Code:-
Code:
#include "FSIO.h"
/************Configuration Bits*************/
#pragma config OSC=HSPLL
#pragma config FCMEN=OFF
#pragma config IESO=OFF
#pragma config PWRT=OFF
#pragma config WDT=OFF
#pragma config LVP=OFF
#pragma config XINST=OFF
/*******************************************/
/*************Pin Configuraion**************/
/*************For MMC Interface*************/
// Chip Select is Connected to RB3_Pin
// Clock is Connected to RC3_Pin
// Serial Data Out is Connected to RC4_Pin
// Serial Data In is Connected to RC5_Pin
//For Connection see HardwareProfile.h Header file
/*******************************************/
#define LED1 PORTDbits.RD0
#define LED2 PORTDbits.RD1
#define ON 1
#define OFF 0
#define ALLOW_FORMATS
void main()
{
//FSFILE *MyFile;
unsigned char text[] = "Hello!! This is Arun Sharma";
unsigned char VolName[] = "ARUN";
TRISD = 0x00;
PORTD = 0x00;
ADCON1 = 0x0F; //All pins to Digital Input Output
LED1 = ON;
LED2 = OFF;
//while (!MDD_MediaDetect());
// Initialize the library
//while (!FSInit());
FSformat(0, 0x11223344, VolName);
LED1 = OFF;
LED2 = ON;
/*//Set the data and time Values
SetClockVars(2012, 12, 8, 10, 35, 5);
//Create a New File Called ARUN.TXT
MyFile = FSfopenpgm("ARUN.TXT", "w+");
//Write Message to File
FSfwrite(text,1,27,MyFile);
//Close the File
FSfclose(MyFile);
*/
while(1);
}
The code which is commented out is working properly, but when i am trying to use format command it is not working.
MPLAB is giving error upon compilation
Error - could not find definition of symbol 'FSformat' in file 'Object - MDD File System-SD Card\My_Main.o'.
Please help