Hi Bert,
No, if you expect 16 bytes you should read RCREG 16 times - one for each byte received. Obviously you have to wait for each byte to actually come in (signalled by the interrupt flag beeing set) but I know you knew that.
As the sending device is sending a byte the USART recevies it by shifting it into the input shiftregister (you can't access this register). Once all bits of the byte are properly received the byte is automatically transfered to the FIFO and the interruptflag is set. When you read RCREG you'll automatically get the byte from the FIFO.
Receiving 16 bytes is no different really, you just need to retreive the bytes one by one and put them in your software buffer/array/whatever.
There should not be any need to throw anything away but apparently there's something strange going on in your case which is why I asked if it is the very first byte after startup or the first byte in every packet that gets read as 0.
Hard to say what's going on really without seeing the code....I'd probably take a step back and just send a single byte and make sure that the it gets received properly.
/Henrik.
Bookmarks