Hi,
Can any one please help me to program a parallax GPS in the Basicx,
because I Try but i dont know what I am doing Wrong. I want to read
the lines that the GPS send out but for some reason when I tried to
get the data from Queue , send to the screen a lot of Garbage. Please
help me is for a Important project. Thanks!!
Here is the code that I start to make :
'******************************
'* GPS PIN ASSINGMENT *
'******************************
'********************************************************
'Constant & Variable Definitions *
'********************************************************
Const PortNumber As Byte = 3
Const SerialInputPin As Byte = 15
Const InputQueueSize As Integer = 40 ' 1 byte buffer.
Dim InputQueue(1 To InputQueueSize) As byte
Const OutputQueueSize As Integer = 40 ' 1 byte buffer.
Dim OutputQueue(1 To OutputQueueSize) As byte
Const Baud As Long = 4800
Const NullOutputPin As Byte = 0
Dim Value As Byte
Dim GetByteGPS as Integer
Dim buffer as integer
'********************************************************
Sub Main()
Call OpenQueue(InputQueue, InputQueueSize)
' Inverted logic, no parity, 8 data bits.
Call DefineCom3(SerialInputPin, NullOutputPin, bx1000_1000)
Call OpenCom(PortNumber, Baud, InputQueue, OutputQueue)
Call GetQueue(InputQueue, Value, 1)
GetByteGPS = GetQueueCount(Value)
Debug.Print " GetByteGPS =" ; CStr(GetByteGPS)
End Sub
'--------------------------------------------------------------------
------------------------------------

(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )
> ... Parallax GPS in [] BasicX...
I don't recall any mention of that receiver here, but it can operate
in two modes, I see. One is "Raw" mode, which produces NMEA
sentences. You can find several recent threads in the archive here
that deal with NMEA GPS strings and DateTimeNMEA.bas - and others,
that should help you get started.
Your receiver also offers a mode that accepts five-byte ASCII commands
to request a specific value, like Altitude or Longitude, each value
separately. You might find that mode easier once you are
fundamentally communicating with the device.
Tom
------------------------------------

(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )