Page 1 of 1

GPS Component

Posted: Tue Sep 28, 2010 12:20 pm
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

Re: GPS Component

Posted: Tue Sep 28, 2010 12:27 pm
by Gypo
Does the GPS component only give the data back if it is valid?

Re: GPS Component

Posted: Tue Sep 28, 2010 12:39 pm
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.

Re: GPS Component

Posted: Tue Sep 28, 2010 2:01 pm
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

Re: GPS Component

Posted: Tue Sep 28, 2010 2:31 pm
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