You can use the hardware module of the PIC16F877A. For the other four, use software USART. Your compiler may have library functions/routines for software UART/USART. Check in the compiler manual.
TRY THIS CODE.....IT WORKS PERFECTLY.....HERE I USE TWO UART.WHEN WE PUT CHARACTER IN ANY WINDOW,IT GETS THIS CHARCTER AND THEN DISPLAYED IN THAT WINDOW......CHECK AND THEN REPLY.........