CR/LF (Carriage retrun/ Line Feed) as a combination
Posted: Sat Apr 17, 2004 10:20 am
Hi
Can somebody tell me how to look for a string combination [CR][LF]. I just can't let the PIC18F6720 detect the GPS stream end with only a [CR] or [LF].
The trimble GPS datasheet state the following:
"[CR][LF]: The carriage return [CR] and line feed [LF] combination terminate the message."
How can this be detected??
Thanks
Willie
Charlie U
Joined: 09 Sep 2003 Posts: 183 Location: Somewhere under water in the Great Lakes
Posted: Sat Apr 17, 2004 10:36 am
The carriage return is 0x0D and the line feed is 0x0A. As your data is received, check each byte for a 0x0D and then if the next byte is 0x0A, the received data string has been terminated.
Is this what you were looking for? If so, I hope this helps.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum