if your data looks like this
Name:  pp1.jpg
Views: 889
Size:  27.1 KB

and your chip is fast enough

a isr routine like this [clear the flag, set inx to zero, set edge index active and off you go]
when flag set you have a pkt

Name:  pp2.jpg
Views: 778
Size:  46.2 KB

might work in pbp



i would do in asm though