The correct thing to do is solve the communication problem in the PIC.
I suggest you add code for checking the OERR and FERR UART flags and reset the
UART per Microchip's instructions if one of them is set.
This is the main reason for communication failure in PIC systems.
DSP Developer (f/m) (Berlin) HOLOPLOT has developed a professional audio system that revolutionizes the way we perceive sound. The system allows us to direct audio waves, like light, in any direction, while maintaining a high quality and very constant volume over long distances.