Hi Henrik,

Let's say Im now sending a serial data "Hanson" and i set my start frame as "AAAAA" and end frame as "EEEEE". So the serial data Im sending is like:
"AAAAAHANSONEEEEE"

at sending side:

start:
SEROUT dataout,N300,["AAAAA","HANSON", "EEEEE"]
pause 100
goto start

My problem is at the receiving side, I wish to filter my received data before storing them. The only solution I have thought was "nested IF loop" but microcode studio don't support this kinda command rather just "IF...THEN". Right?
so, how can I write my coding to perform this data filtering task?
eg:
check if data_in[0]="A" ;if yes then proceed checking for second "A"
check if data_in[1]="A" ;if yes then proceed checking for third "A"
check if data_in[2]="A" ;if yes then proceed checking for forth and fifth "A"
check if data_in[13]="E" ;if yes then check for second "E"
.
.
.
check if data_in[16]="E" ;if all conditions matched (receive first 5 "A" and last 5 "E" properly) then store data_in
else loop back subroutine and repeat checking for first "A"

Regards