GPS from Polstar

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
billduck
Posts: 159
Joined: Thu Jul 01, 2010 1:57 am
Has thanked: 23 times
Been thanked: 16 times
Contact:

GPS from Polstar

Post by billduck »

I had successfully written a program for a tracking solar array - moving a set of panels to face the sun. I am switching from a real time clock to a GPS for timekeeping. So I want to read the data from a Polstar unit <http://www.polstargps.com/Polstar_GPSpr ... MB648.html> I have a hunch that the stock code for a GPS has not been written for this particular GPS. Has anyone modified the stock code for this particular GPS? I apologize, I am a novice code writer.Thanks in advance. Bill S

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: GPS from Polstar

Post by JohnCrow »

Hi Bill

Have you any reason for using this GPS module. Flowcode may be easier to get working with the fastrax one as used in the Matrix eblock
See these posts for more info on problems encountered. I see from the website it is capable of runing at 9600 baud which is the flowcode macro default so thats a good start :)

http://www.matrixmultimedia.com/mmforum ... gps#p34862

I personally have only used the eblock gps, but it does work very well even indoors way from windows.
This sounds like an interesting project.
1 in 10 people understand binary, the other one doesn't !

billduck
Posts: 159
Joined: Thu Jul 01, 2010 1:57 am
Has thanked: 23 times
Been thanked: 16 times
Contact:

Re: GPS from Polstar

Post by billduck »

Duh!. I will explore that.

billduck
Posts: 159
Joined: Thu Jul 01, 2010 1:57 am
Has thanked: 23 times
Been thanked: 16 times
Contact:

Re: GPS from Polstar

Post by billduck »

So, I am using a ATMEGA2560 processor. I note that MM has several upstream boards, including an AVR board. I hope that the packaged code, that comes stock in Flowcode4, has been written for this board?
Is this a legitimate question? Am I on the right track by incorporating a Fastrax GPS?
I am an ex-non-programmer, but very timid about that.

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: GPS from Polstar

Post by JohnCrow »

Hi Bill

Im not familiar with the AVR chips but I'm sure flowcode 4 has the gps for all the different versions. Im sure MM will confirm this when they open today.
1 in 10 people understand binary, the other one doesn't !

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 from Polstar

Post by Benj »

Hello,

Flowcode v4 for AVR supports the ATMEGA2560 and the GPS component (though it is the older 4800 baud version of the component).

Flowcode v5 for AVR should be ready for release within the next couple of months which supports the newer GPS component and all the other v5 upgrades.

The ATMEGA2560 device will not work with the EB019 upstream board as this only supports DIL type IC packages. See the EB019 datasheet for a list of compatible target AVR devices.

billduck
Posts: 159
Joined: Thu Jul 01, 2010 1:57 am
Has thanked: 23 times
Been thanked: 16 times
Contact:

Re: GPS from Polstar

Post by billduck »

Put me on the list for Flowcode v5-AVR.
It seems logical to ask where do I connect the data line to the Atmega2560 microcontroller. I have looked at the custom code for the GPS, and do not recognize anything that shows where to connect. The help file indicates to use the hardware UART. I find 4 TxRx (D0-D3).
Thanks, from a newbie.

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 from Polstar

Post by Benj »

Hello,

It looks like the standard UART signals are attached to the following pins on this device.

RXD0 -> E0
TXD0 -> E1

RXD1 -> D2
TXD1 -> D3

RXD2 -> H0
TXD2 -> H1

RXD3 -> J0
TXD3 -> J1

By default the component will use UART channel 0.

billduck
Posts: 159
Joined: Thu Jul 01, 2010 1:57 am
Has thanked: 23 times
Been thanked: 16 times
Contact:

Re: GPS from Polstar

Post by billduck »

I finally got around to hooking up the GPS from Parallax <http://www.parallax.com/Portals/0/Downl ... n_V0.1.pdf> It works fine on the Latitude,Longitude and Time, all being reported correctly. But the date comes in a (my formatting) D/M/Y as 0/93/0. The date today is 6/13/2012. I would expect the numbers to be reported as 06,13,12. I have attached subroutines for the time and date. Any Ideas? If I reboot the mC, the number changes. For instance, now it is 72/0/3.
By the way, I have not figured out how to give thanks for the help the forum provides.
Attachments
GetDate.fcm
This subroutine reports the Date incorrectly.
(3.62 KiB) Downloaded 324 times
GetTime.fcm
This subroutine works fine. I am using a serial LCD, hence the conversion to a string, and sending to the LCD on RS 232.
(3.75 KiB) Downloaded 335 times
Last edited by billduck on Thu Jun 14, 2012 6:50 pm, edited 2 times in total.

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: GPS from Polstar

Post by JohnCrow »

Hi Bill
By the way, I have not figured out how to give thanks for the help the forum provides.
Just click the little "Thumbs Up" Icon on the top right of the message window
1 in 10 people understand binary, the other one doesn't !

Gary Freegard
Posts: 45
Joined: Mon Nov 07, 2011 6:36 pm
Has thanked: 1 time
Been thanked: 30 times
Contact:

Re: GPS from Polstar

Post by Gary Freegard »

Hi Bill

Not sure if this could help you, but I did modify the GPS example to help Jorgen
http://www.matrixmultimedia.com/mmforum ... =29&t=9141

But also if you know the GPS format you can check to see if the Flowcode GPS module is looking at the right part, by having a look at GPS_Process_String in the Custom Code section.

Hope this helps.

Gary

billduck
Posts: 159
Joined: Thu Jul 01, 2010 1:57 am
Has thanked: 23 times
Been thanked: 16 times
Contact:

FC 5 and GPS

Post by billduck »

If I start a project with a GPS component, and ask to "read Longitude", and compile to hex, the 4 errors reported are:
undefined reference to float32_div
undefined reference to float32_from_int32
undefined reference to float32_add
undefined reference to float32_sub

Flowcode 5 for AVR.
Thanks, Bill S

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 from Polstar

Post by Benj »

Hi Bill,

I have just tried it here and it is working ok for me. Can you please attach a program that demonstrates this compilation error?

billduck
Posts: 159
Joined: Thu Jul 01, 2010 1:57 am
Has thanked: 23 times
Been thanked: 16 times
Contact:

Re: GPS from Polstar

Post by billduck »

I created and added the file. The error occurs when I compile to hex.
I still have FC4 Pro installed.
Thanks.
Attachments
GPS_ARDU8_20.fcf_avr
(6.5 KiB) Downloaded 265 times

Post Reply