johankj
New Member
I saw this code for a PIC (16F88) using RS232 to receive GPS data.
All GPS data has a string identifier at the start of the sentence $, followed by for example $GPRMC.
Here is the code in question
Rcd_Char I assume is the received character, which is moved to W. Then, presumably, xorlw '$' will maske W, and return zero.
WOT? Have I've been doing hours of ASCII to binary conversions all for nothing? When I could've done:
All GPS data has a string identifier at the start of the sentence $, followed by for example $GPRMC.
Here is the code in question
Code:
;Sit here waiting around until you get a valid start of a NMEA sentence
movfw Rcd_Char
xorlw '$' ;start of sentence?
Rcd_Char I assume is the received character, which is moved to W. Then, presumably, xorlw '$' will maske W, and return zero.
WOT? Have I've been doing hours of ASCII to binary conversions all for nothing? When I could've done:
Code:
MOVLW 'A'
CALL RS232_SEND