Hello eoasap,
e>>so pseudo code something like this?
loop:
SERIN2 one byte
check that byte for Carriage return (when to stop)
if CR, exit_loop
....
process data
.....
goto loop
exit_loop;
<<
yes this is a good pseudo code example.
Now to answer your other question:
do you think there will be any dataloss doing a loop for the read?
This depends on how your data is being sent. If it is a non-stop 40 characters, yes, you will lose some data. You will have to change your read to a different method... like reading in a string of characters or something before processing.
If your data is coming in spurts, you can use a "control" character to "flag the receiver that the following character is the one you want read.
If I were you, I would *FIRST* find out HOW the data is being sent to you. Then program your PIC for this format of sending. *IF* you can chose the way the data is being sent to you, then you have many many available options!...
Dwayne
Ability to Fly:
Hurling yourself towards the ground, and missing.
Engineers that Contribute to flying:
Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute
Pilots that are Flying:
Those who know their limitations, and respect the green side of the grass...
Bookmarks