Im trying to make a protocol converter using the serin an serout commands. The device sends instructions of varying length. That’s the problem. Ive used SERIN PortB.5,N9600,b0,b1,b2,b3 but some of the instructions only use b0,b1 so the serin command is still waiting for b2 and b3. Ive also tried adding the timeout instruction to the command to reset serin, this does work 90% of the time but it tends to miss out instructions during the time out.

(b0,b1,b2,b3 are var bytes)

Any ideas Sphere.