Unexpected preceding zero's on Serial.read()

Hello all.

I have an issue on a Mega while reading on a serial port at 10400 bauds.

I always seem to receive two zero's before the data I am expecting.

My setup is as follows;

A device transmits data at 10400 bauds. I am the wire on which the data is transmitted connected to my Serial3 Rx.

The code used for the Rx is as below;

int outByte = 0;

while (Serial3.available() > 0) // did I recieve data?

outByte = Serial3.read();
Serial.println(outByte, HEX);

Anyone have any ideas?


Let me refine that a little.

There always seems to be 2 bytes already available for reading before data is actually received on the wire.



prints "2" first time and "1" the second time.

More details, more code.