Hi, I have two devices communicating with SERIN2/SEROUT2. Device A, a PIC18F4550, sends data to device B a PIC16F19197. I'm receiving the data at device B using SERIN2, but like 1 out of 5 times I receive a wrong byte. I know that device A is sending the correct data because I can see the right data with my logical analyzer. So, the problem is with SERIN2.

I placed a 10k resistor in series to prevent either device to send power to the other device when one of them is turned off. Do you think that this resistor is the problem?

Code:
'Code at device B, PIC18F4550
SEROUT2 PORTB.7,32,[STR RFID_IN\7]

'Code at device B, PIC16F19197
SERIN2 PORTE.1, 32, 5, BOARDSEARCHFAILED, [STR ClockInDataArray\7]