Fat32 simple sample

General discussion on mikroPascal PRO for PIC.
Post Reply
Author
Message
poke53280
Posts: 5
Joined: 27 Sep 2014 10:32

Fat32 simple sample

#1 Post by poke53280 » 02 Mar 2015 23:56

Hi,

I'm a Delphi user.
I've got PIC18F46K22 (23 pieces) and 20x4 Alpha numerik Lcd Displays (23 pieces too) and 24LC512 (23 pieces too);

I'm reading analog values from ADC0 and calculating some formulas, and saving to 24LC512 and read from 24LC512 again and showing on LCD success. No Problem.

Now, i want to transfer all data to a file as named 'log.cvs' on a SD Card with fat32 formatted. Sd cards must be bigger than 4 Gb.

I'm finding some samples, but i can't understand them, they are too complex samples for me.

I must see a simple code about this if you please.

Greetings.
Best Regards.

User avatar
marina.petrovic
Posts: 2986
Joined: 18 Apr 2013 08:11

Re: Fat32 simple sample

#2 Post by marina.petrovic » 03 Mar 2015 13:57

Hi,

When you download FAT32 Library from LibStock Website you can see some examples which demonstrate basic functionality of the FAT32 library: http://www.libstock.com/projects/view/108/fat32-library

The example covers all architecture in the same time, which can be confusing, but you can take a look at basic functions, read, write, open and so on.

Also, you can search our forum and LibStock Website to see whether some of our users posted their projects which can help you.

Best regards,
Marina

chimimic
Posts: 178
Joined: 29 Sep 2007 14:35
Location: France
Contact:

Re: Fat32 simple sample

#3 Post by chimimic » 04 Mar 2015 07:58

Hi poke,

as Marina said, you'll find usefull code in Mikroe/Libstock examples.
And as you said, there is in these examples more than you need to start ;-)

When I started with FAT and SD, I used Mikroe sample, and removed all lines in the example that were not needed for my use. Because yes, read is enough to start (for my part, I started with just reading data in FAT16).

To avoid track multiple hard and soft errors, I decided to get a SD card module from Mikroe, so there were more chance a not fonctionning program came from my code. After getting my "reduced code" working, I tried others routines and others SD card modules.

Good luck ! :D

poke53280
Posts: 5
Joined: 27 Sep 2014 10:32

Re: Fat32 simple sample

#4 Post by poke53280 » 25 Mar 2015 16:50

i will use Fat16.
Thanks.

Post Reply

Return to “mikroPascal PRO for PIC General”