Shop OBEX P1 Docs P2 Docs Learn Events
GPS PMB-688, SEROUT problems — Parallax Forums

GPS PMB-688, SEROUT problems

kentjc913kentjc913 Posts: 2
edited 2011-04-25 16:14 in Accessories
having difficulty with SEROUT to PMB-688 GPS. only response to first SEROUT command in a list of several.

' {$STAMP BS2pe}
' {$PBASIC 2.5}

'
[ I/O Definitions ]
' GPS PMB-688
GPSpin PIN 0 ' GPS serial output
GPSpout PIN 2 ' GPS serial input

'
[ Constants ]
#SELECT $STAMP
#CASE BS2, BS2E, BS2PE
T2400 CON 396
T4800 CON 188 ' Baud rate for GPS (typical)
T9600 CON 84
T19K2 CON 32
#CASE BS2SX, BS2P
T2400 CON 1021
T4800 CON 500 ' Baud rate for GPS (typical)
T9600 CON 240
T19K2 CON 110
#CASE BS2PX
T2400 CON 1646
T4800 CON 813 ' Baud rate for GPS (typical)
T9600 CON 396
T19K2 CON 188
T38K4 CON 84
GPSBaud CON T4800

'
[ Initialization ]
Initialize:
' GPS outputs
PAUSE 1500
SEROUT GPSpout, GPSBaud, ["$PSRF103,00,00,01,01*25",CR,LF] ' GGA on @ 1 sec
PAUSE 100
SEROUT GPSpout, GPSBaud, ["$PSRF103,01,00,00,01*25",CR,LF] ' GGL off
PAUSE 100
SEROUT GPSpout, GPSBaud, ["$PSRF103,02,00,00,01*26",CR,LF] ' GSA off
PAUSE 100
SEROUT GPSpout, GPSBaud, ["$PSRF103,03,00,00,01*27",CR,LF] ' GSV off
PAUSE 100
SEROUT GPSpout, GPSBaud, ["$PSRF103,04,00,01,01*21",CR,LF] ' RMC on @ 1 sec
PAUSE 100
SEROUT GPSpout, GPSBaud, ["$PSRF103,05,00,01,01*20",CR,LF] ' VTG on @ 1 sec
PAUSE 100

have varied pause intervals with no luck. any ideas, thanks

Comments

  • Kevin CookKevin Cook Posts: 159
    edited 2011-04-25 16:14
    You may want to try and WAIT for the GPRMC and GGA data. You shouldn't have to send the request. Have you tried using a SERIN and waiting for those values?

    You wouldn't even need to connect the RX line just the TX line to your Stamp. Example pulled from the test code: SERIN GPSpin, T4800, 2000, Signal_Is_Valid, [WAIT("GPGGA,"), SPSTR 75]
Sign In or Register to comment.