GPS Component

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
Gypo
Posts: 52
Joined: Thu Apr 29, 2010 11:12 am
Has thanked: 5 times
Been thanked: 3 times

GPS Component

Post by Gypo »

Hi

What is the unit(byte) parameter in the GPS component when reading Time or Date?

I have a GPS unit kicking out the standard GPS formmated data in TTL RS232 format into the pic (18F4520) but it seems whatever number I put in that field it returns either 0 or 255.


I know the GPS is sending out the correct data as I can see it when I pump the levels up and push it through my PC's serial port.
I know the pic is working too as all the messages come up on the LCD attached to it, I just don't seem to be able to read from the GPS unit using the GPS component.

I have looked for GPS in the help, forum, FAQ and found nothing that relates to the component..

Many thanks
The only real simulation isn't ...
Gypo

Gypo
Posts: 52
Joined: Thu Apr 29, 2010 11:12 am
Has thanked: 5 times
Been thanked: 3 times

Re: GPS Component

Post by Gypo »

Does the GPS component only give the data back if it is valid?
The only real simulation isn't ...
Gypo

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

Re: GPS Component

Post by Benj »

Hello Gypo,

I recently overhawled the GPS component and you may not be using the very latest version of the C code.

First ensure that the attached file matches the C file in your "Flowcode v4/Components" directory. If the file in the directory is older then I would suggest replacing it with the attached file.
PIC_GPS.c
(22.45 KiB) Downloaded 264 times
Have you set the baud rate in the component properties to match your GPS hardware?

Also have you ran a quick 1 second flasher program to ensure that your clock speed and configuration are all setup correctly in Flowcode for your hardware? This will ensure that everything is ok on the hardware for your specified baud rate to be working correctly.

The GPS data variables should be populated whether the data is flagged as valid or not.

Gypo
Posts: 52
Joined: Thu Apr 29, 2010 11:12 am
Has thanked: 5 times
Been thanked: 3 times

Re: GPS Component

Post by Gypo »

Benj

Thanks, put that on in place of the existing file and now got seconds comming through.

I just need to work out what unit number relates to what part of the time and date..

Thanks
again
The only real simulation isn't ...
Gypo

Gypo
Posts: 52
Joined: Thu Apr 29, 2010 11:12 am
Has thanked: 5 times
Been thanked: 3 times

Re: GPS Component

Post by Gypo »

Benj

I have found the unit settings for the Time component, though I'm sure you won't need it but for those that don't know it and can't find where it is shown....
Unit Value - Part of Time - Part of Date
0 Seconds Day (date)
1 Minutes Month
2 Hours Year (last 2 digits only)

Is there a way of getting the whole year? (without the obvious adding a '20' before the returned number...)
If it was taken from the ZDA string it could be got from there, I know not all GPS units give this string and many have a feature that you can select which strings to output but if a choice could be given of which string to use... some how...

Many thanks again
The only real simulation isn't ...
Gypo

Post Reply