FAT SD Card Data Logger

An area to discuss 8-bit PIC specific problems and examples

Moderator: Benj

Post Reply
George_B
Posts: 112
Joined: Wed Jul 04, 2012 11:21 pm
Location: Greece
Has thanked: 43 times
Been thanked: 16 times
Contact:

FAT SD Card Data Logger

Post by George_B »

Hello !


I would like to use the SD componet. I read in the forum a few topics for reading from and writing to sd card and based on the examples i implement a data logger with gps data.

The simulator working good. The created file in the PC does contain the correct data as i want to be desplayed.

The problem i am facing is with real hardaware and the file which is created by the MCU.

Attached is the program i am using to make the logs onto the SD card every 5 secs.

As you can see the data seems to be corrupted in real tests.

Is it something i am doing wrong?

Thanks in advance!

Regards
George
Attachments
FAT_Data_Logger_Simple_Slow.fcfx
(27.26 KiB) Downloaded 8 times
log1(real Test with hardware).txt
(220 Bytes) Downloaded 6 times
log1(Created in Simulation).txt
(246.41 KiB) Downloaded 5 times

George_B
Posts: 112
Joined: Wed Jul 04, 2012 11:21 pm
Location: Greece
Has thanked: 43 times
Been thanked: 16 times
Contact:

Re: FAT SD Card Data Logger

Post by George_B »

I just figure out that the problem has to do with the string variable in the program.

The string "filestring" could not hold the sum of all other strings that i wanted.

I made a small change in the structure of the program and now i am able to write the way i want in SD.

Here is the solution for me.

It looks like the string variable could not hold more than 20 characters even if i tried to increase its array inside the brackets [].


Hope that helps and someone else having the same issue.


Happy Easter and my best wishes to you all.


George
Attachments
FAT_Data_Logger_Simple_Slow.fcfx
(32 KiB) Downloaded 9 times

George_B
Posts: 112
Joined: Wed Jul 04, 2012 11:21 pm
Location: Greece
Has thanked: 43 times
Been thanked: 16 times
Contact:

Re: FAT SD Card Data Logger

Post by George_B »

Hi,

For a project it is required to log GPS positioning data in an SD card every few seconds.
I have a few GPS modules available for testings but i get correct and valid position only with L76X module using U-center software.

Unfortunately i can not read the module's data when i try to write a simple program in flowcode 7 with GPS component.
It seems that the current component for GPS in flowcode can not identify the data inside the incoming string.


I captured a few lines of data from GPS module L76X to show you the format of the data that the mcu is receiving.
samle.txt
(118.26 KiB) Downloaded 11 times
hope someone can help with this one.

Regards
George

User avatar
Benj
Matrix Staff
Posts: 15197
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4762 times
Been thanked: 4296 times
Contact:

Re: FAT SD Card Data Logger

Post by Benj »

Hi George,

Please can you post your flowcode project file and I'll have a look at this for you. The gps output should be fairly standard but i will check the file you sent to make sure.

Post Reply