I'm very new to flowcode and have been away from basic programming for a long time, I'm working on a simple project with my pic (877A) to supplement a measurement on an oscilloscope on a K Line interface.
I'm using the 16F877A USART to receive BYTES and process them looking for a particular BYTE value of A7, anything else that comes along I will discard. When I see 0xA7 I want the PIC to wait for approx 500mS and then toggle an output HIGH. I am lucky in that A7 comes in with 3 other BYTES all of which I believe always a particular value e.g. 10 1A A7 20
I can't decide how to handle the data and sift through it, I have considered defining a string variable to receive the 4 BYTES, converting it to an Integer and subtracting it from static variable. If the result is zero then I know the sequence of BYTES contains the one I'm looking for and then I can proceed as required, if the result is not zero then I continue looking.
If I try this how do I ensure I don't miss any BYTES on the "line" while I'm performing the calculation?
Is there a better way of performing the function?
Thank you
Carl