You can loop the Serin2 or the Serin until the predetermined "Flag" is found.
Loop:
serin datapin....variable.
Process by storing data in Eprom or whatever
if variable <> CR (or flag) goto Loop:
This is assuming you are reading 1 char at a time.
I don't know how your data is being sent... but you can read a string of char and check for the "Flag" before looping back.
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