I am sending simulated NMEA sentences (See bottom of the program) to the PIC using a macro from a computer terminal.
Hi C.
You say that you are using the list of test messages at the end of the program.
E
If you use this message as an input, note it is
90 characters long plus crlf = 92
$GPGGA,BASEDEGREE.00, 1000.00000, N, 00100.00000, W, 1, 10, 0.94, 000.0, m, 47.8, m,, * 47
Your buffer is only
80 long!
Dim str1(
80) As Byte 'UART RXD buffer array
There is also an over length buffer error trap.
getmsg: 'read and save GPGGA msg
If PIR1.RCIF = 0 Then Goto getmsg
char = RCREG
str1(rxi) = char
rxi = rxi + 1
If rxi > 80 Then Goto get_neo 'msg bfr over run
'If char = 0x3f Then Goto eomsg '(0x3f = ?)SIM>>>>>>>>>>>>>>>>>>>>>>>>>>>.
If char = 0x0a Then Goto eomsg '(0x0a = LF)CIRCUIT>>>>>>>>>>>>>>>>>>>>>>>>
Goto getmsg
eomsg:
If rxi < 60 Then 'invalid msg
Goto get_neo
Endif
'$GPGGA,BASEDEGREE.00, 1000.00000, N, 00100.00000, W, 1, 10, 0.94, 000.0, m, 47.8, m,, * 47
'$GPGGA,BASEDEGREE.00,1000.00000,N,00100.00000,W,1,10,0.94,000.0,M,47.8,M,,*47
'$GPGGA,BASEDEGREE.00,1000.00000,N,00100.00000,W,1,10,0.94,000.0,M,47.8,M,,*47
'$GPGGA,BASEDEGREE.00,1000.00000,N,00100.00000,W,1,10,0.94,000.0,M,47.8,M,,*47
'$GPGGA,BASEDEGREE.00,1000.00000,N,00100.00000,W,1,10,0.94,000.0,M,47.8,M,,*47
'$GPGGA,BASEDEGREE.00,1000.00000,N,00100.00000,W,1,10,0.94,000.0,M,47.8,M,,*47
'$GPGGA,BASEDEGREE.00,1000.00000,N,00100.00000,W,1,10,0.94,000.0,M,47.8,M,,*47
'$GPGGA,BASEDEGREE.00,1000.00000,N,00100.00000,W,1,10,0.94,000.0,M,47.8,M,,*47
'$GPGGA,BASEDEGREE.00,1000.00000,N,00100.00000,W,1,10,0.94,000.0,M,47.8,M,,*47
'$GPGGA,BASEDEGREE.00,1000.00000,N,00100.00000,W,1,10,0.94,000.0,M,47.8,M,,*47
'