Hi,
I have built a GPS based regional time clock which doubles as a UTC clock. At present I am receiving all the messages but I only want the NMEA messages "GGA" and "RMC" all others being off. I have tried every thing I can to get them to turn off. See attached test code, which displays UTC Ok, but the commands have no effect on the GPS chip. Elsewhere on the forum this seems to be answered but it does not work for me. I have tried direct commands from PICAXE chip (see code) and from a terminal window in GPSDIAG free software. I have run up against the wall.
Can someone please help???
Many thanks
Bob
I have built a GPS based regional time clock which doubles as a UTC clock. At present I am receiving all the messages but I only want the NMEA messages "GGA" and "RMC" all others being off. I have tried every thing I can to get them to turn off. See attached test code, which displays UTC Ok, but the commands have no effect on the GPS chip. Elsewhere on the forum this seems to be answered but it does not work for me. I have tried direct commands from PICAXE chip (see code) and from a terminal window in GPSDIAG free software. I have run up against the wall.
Can someone please help???
Many thanks
Bob
Code:
'---------------GPS Receiver Test Code ------------
'
' USING EM-406A GPS RX MODULE
'
' Display UTC Time via rs232 from GPS rx
' Uses 20X2 & 4 x 40 char LCD
' GPS Input on pin 8 = C.2 from max 232
' GPS Output on pin 6 = C.4 to max 232
' LCD Output on pin b.3 serial to 4 x 40 LCD Display (ex 2030)
'
' *** NB GPS Rx runs at 4800 Bps Inverted to norm e.g. T4800_16 ****
'
' *** Serial out LCD is 2400 Bps Norm e.g. N2400_16 (MFREQ = 16) ****
' ---------------------------------------
symbol baud = N2400_16
symbol Sout = b.3 ; serial output on this pin
Symbol gps_in = c.2 ' GPS serial data messages input
Symbol gps_out= c.4 ' NMEA Commands to GPS
setfreq m16
main:
'work on top half of display
serout Sout,baud,(255,0) ' select upper 2 lines
pause 100
Serout Sout,baud, (254,1) ' clear upper 2 lines
pause 100
serout sout, baud,(255,0) ' select upper 2 lines
pause 100
Serout Sout,baud, (254,128)' start pos line 1
Pause 100
serout sout, baud, ("GPS NMEA Selection")
'work on bottom half of display
Serout Sout, baud, (255,1) ' select lower 2 lines
Pause 100
Serout Sout, baud, (254,1) ' clear lower 2 lines
pause 100
serout Sout, baud, (254,128)' line 1 pos 1 bottom half
pause 100
serout c.4 ,t4800_16, ("$PSRF103,01,00,00,00,13,10") ' turn off GLL
serout c.4 ,t4800_16, ("$PSRF103,02,00,00,00,13,10") ' turn off GSA
serout c.4 ,t4800_16, ("$PSRF103,03,00,00,00,13,10") ' turn off GSV
serout c.4 ,t4800_16, ("$PSRF103,05,00,00,00,13,10") ' turn off VTG
serout c.4 ,t4800_16, ("$PSRF103,06,00,00,00,13,10") ' turn off ZDA
data_in:
serout Sout, baud, (254,128) ' line 1 pos 1 bottom half
' Data in is ASCII Format
serin c.2, t4800_16, ("$GPGGA"), b0,b1,b2,b3,b4,b5,b6 ' read time into variable
b1=b1-48:b2=b2-48:b3=b3-48:b4=b4-48:b5=b5-48: b6=b6-48 'subtract 48 to bring to decimal
serout sout, baud, ("UTC = ",#b1,#b2,":",#b3,#b4,":",#b5,#b6)' write time to LCD
goto data_in
goto main