I recently bought an Ultimate GPS Breakout http://www.adafruit.com/products/746 with the MTK3339 chipset.
I couldn't find any documentation for use with the PICAXE so I've been playing around with it. The factory default setting is 9600 baud. The only PICAXE pins I could get to work with the GPS were hserin/hserout. Any other pins just produced garbage. I assume the chip can't keep up with the 9600 baud from the GPS.
The problem with hserin is you can't look for input starting with a string (e.g. "$GPRMC") like you can with serin. I got around this problem by linking hserout on the PICAXE to the Rx pin on the GPS and linking the GPS Tx pin to an In pin (e.g. B.0) on the PICAXE.
I then changed the baud to 4800 from my program which meant the PICAXE could keep up with the GPS and I could then use serin.
This code shows you what I mean.....
I can now just read the NMEA sentences I want.
I hope this information will save other people many hours of head scratching.
I couldn't find any documentation for use with the PICAXE so I've been playing around with it. The factory default setting is 9600 baud. The only PICAXE pins I could get to work with the GPS were hserin/hserout. Any other pins just produced garbage. I assume the chip can't keep up with the 9600 baud from the GPS.
The problem with hserin is you can't look for input starting with a string (e.g. "$GPRMC") like you can with serin. I got around this problem by linking hserout on the PICAXE to the Rx pin on the GPS and linking the GPS Tx pin to an In pin (e.g. B.0) on the PICAXE.
I then changed the baud to 4800 from my program which meant the PICAXE could keep up with the GPS and I could then use serin.
This code shows you what I mean.....
Code:
hsersetup B9600_8, %10000 ; GPS serial output (input not used)
hserout 0,("$PMTK251,4800*14",CR,LF) ; Slow GPS output down to 4800 baud so I can use serin command
serin B.0, T4800_8, ("$GPRMC"), b0, b1, b2, b3, b4, .......etc. ; Read NMEA $GPRMC sentence from GPS
I hope this information will save other people many hours of head scratching.
Last edited: