Let's Make Robots!

help us! Need to read values from picaxe digital inputs for Garmin GPS

Hi.

Soooo...

We have a Garmin 16 HVS datasheet

and a Picaxe 28x1

We have wired the 2 output wires for data out from the Garmin unit to the digital inputs on the Picaxe board. Can anyone provide some commands or code snippet that I can use to read what the values from the digital inputs are? I have looked over the picaxe manuals but didn't see any specific commands for getting this data. We are hoping that the GPS output can be displayed in a text format which would let us parse and do what we will with it. Does anyone know if this sounds possible or do we need some other device that can interface with the Garmin?

 Basically...the end result is a GPS enabled RC car which is powered only by the Picaxe to control GPS coordinates, navigation, and servo control.

Really, the first step we need help with is just how to properly read the values given from the digital inputs.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
The picaxe is a bit slow for this, no? Or can the higher end 28/40Xx models handle the datastream from a gps?
Thanks. I'll check out the code above and see how we are looking. Although I think you are right that we are going to have to add true serial port access to the Picaxe to get a valid ouput. It might be better cost alternative to start with an Arduino based board...but we will see. I'll let you know how it works out :)

yup. Looks like to get proper output we need to have true serial port reading for the picaxe. We are going to go with an arduino based setup which has this support by default. That should make it much easier to interface with the garmin from the start. Plus, there have already been a number of posts using the Arduino for this, so we know it will be fast enough to parse the data.

 Thanks all.

You need to use the serin and serout commands to talk with the GPS unit.  I think you also need a RS232 translation circuit on the GPS output side as the output signal is a true RS232 voltage.  Once you are reading from the serial port, you will need to parse the GPRMC sentences for lat, long, velocity ect...

here is a snippet for serial comm from the picaxe forums(good place to get info for your picaxe!)

28x1 code


symbol chipid =0
symbol buffer1 =b0
symbol buffer2 =b1
symbol result = b2
symbol talk = 4
high talk
symbol listen = pin0
setint 0,%00000001

main:
for b3 = 1 to 10
if b3 = 10 then
gosub send
endif
pause 50
next b3
goto main

send:
if listen = 0 then send
setint off
low talk
pause 10
serout talk,N2400,(1,1)
high talk
setint 0,%00000001
return

interrupt:
serin talk,N2400,buffer1,buffer2
if buffer1 = 0 then
let result = buffer2
endif
setint 0,%000000001
debug result
return

Gareth on this site did a really good writeup on gps also, Check it out:

http://letsmakerobots.com/node/5972

This is a good time to remind everyone, especailly the newcomers, that there is a wealth of information both here on LMR and on the Rev_Ed Picaxe forum.

Most likely, someone else has had a similar problem and posted the solution. 

USE THE SEARCH FUNCTION!