|
Re: Distinguish Serial Data?
Another possibility, depending on the data your program generates, is to use the high order bit in each byte as your id flag.
Anything you type into your terminal window will be ASCII. ASCII never uses the most significant bit in a byte, so in every byte originating from your terminal window, bit 8 will be zero.
Your program generated stuff can always set bit 8 to one.
Of course this limits the program data you send to 7-bit values, unless you split them over multiple bytes.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Last edited by Mark McLeod : 04-08-2006 at 09:29.
|