Not being familiar with his programming approach, I created my own NMEA module. It is interrupt driven, but will wait for manual intervention between sentence parsing. It's quite easy to use and can be configured to operate in either the high/low interrupt vector:
Code: Select all
// define device, clock and disable MCLRE
Device = 18F2520
Clock = 32
Config MCLRE = Off
Include "InternalOscillator.bas" // this module configures the internal oscillator to operate at 32Mhz from the get-go
Include "NMEA2.bas"
Include "USART.bas" // the USART module is required to configure the baud rate
Include "Convert.bas"
Dim tmpField As String(12)
Dim i As Byte
// main program start...
USART.SetBaudrate(br38400) // configure USART
NMEA2.Initialise() // intialise NMEA2 module
// main program loop
While True
NMEA2.NextSentence("GPRMC")
Repeat
Until NMEA.NewItem
For i = 0 To NMEA.FieldCount
If GetField(i,tmpField) Then
USART.Write("GPRMC Field ",DecToStr(i), " = ",tmpField,13,10)
EndIf
Next
NMEA.NewItem = False
Wend
The user module is hosted at Digital DIY and in the SF Wiki. As always - I'm open for feedback and tips!