It seems everyone's gone GPS mad at the moment so I thought I'd try one only $35 delivered.
The GPS is conveniently powered from the mini USB port
when data is received from a satellite a blue led will pulse every second
and 8 different messages are sent out at 9600 baud.
$GPGGA, $GPGLL, $GPGSA, $GPGSV,3,1, $GPGSV,3,2, $GPRMC, $GPVTG
It was easy just hook up an axe132 so I thought ?
Eventually worked out activity was on the GPS_Datain TP7 ,on the board I received. we need to connect to this.
It seems the data pins are crossed proberly why it doesn't come with any header pins which I had to solder on.
I can just imagine all those magic comments from Dippy !!
Now we can run our code. it should display perth time in the terminal.
to see the $GPRMC message just uncomment this was chosen becuase it seems to be the only one that has the date.
You can also test the GPS board without connecting the axe132.
You need to install a driver for the onboard USB here's a link to find the latest driver
http://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx
version 6.6.1 for windows 7 and others.
Once installed checkin Picaxe/options/serialport
and select Silicon Labs
you can view all messages from the GPS in the terminal...
The GPS is conveniently powered from the mini USB port
when data is received from a satellite a blue led will pulse every second
and 8 different messages are sent out at 9600 baud.
$GPGGA, $GPGLL, $GPGSA, $GPGSV,3,1, $GPGSV,3,2, $GPRMC, $GPVTG
It was easy just hook up an axe132 so I thought ?
Eventually worked out activity was on the GPS_Datain TP7 ,on the board I received. we need to connect to this.
It seems the data pins are crossed proberly why it doesn't come with any header pins which I had to solder on.
I can just imagine all those magic comments from Dippy !!
Now we can run our code. it should display perth time in the terminal.
to see the $GPRMC message just uncomment this was chosen becuase it seems to be the only one that has the date.
Code:
#picaxe 18m2 'version 2.D
#terminal 9600
SYMBOL hours = b0
Main:
SETFREQ M16 'read GPS data at 9600 baud
bptr = 28
SERIN c.5,t9600_16,("MC,"),@bptrinc,@bptrinc,_
@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,_
@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,_
@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,_
@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,_
@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,_
@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc
SETFREQ M8 'display message at 9600 baud using terminal
SureGPSmessage:
' SERTXD (13,10,"$GPRMC,")'$GPRMC,HHMMSS.sss,A,DDMM.mmmm,S,DDDMM.mmmm,E,0.00,88.53,DDMMYY,,,D*4D
'FOR bptr = 28 TO 88
' SERTXD(@bptr)
' NEXT
Displaytime:
bptr= 28
hours = @bptrinc *10 + @bptrinc -528
hours = hours +8 'Perth TimeZone
IF hours >230 THEN : hours=hours+24 : ENDIF 'negative TimeZone
IF hours >23 THEN : hours=hours-24 : ENDIF 'positive TimeZone
SERTXD (13,10,"PERTH TIME ",#hours,".",@bptrinc,@bptrinc,".",@bptrinc,@bptrinc)
GOTO main
You need to install a driver for the onboard USB here's a link to find the latest driver
http://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx
version 6.6.1 for windows 7 and others.
Once installed checkin Picaxe/options/serialport
and select Silicon Labs
you can view all messages from the GPS in the terminal...
Attachments
-
219.4 KB Views: 60
-
642.7 KB Views: 69