im trying to get the data from the serial port and make it as an input in pic16f877a but don't know how., since the data transmitted is bit by bit, and i need to get 4 digit input and displayed it to the 7 segments. How can i join every bit of the digit? for instance the first data was 0 then 1 then 0 then 0? how can i integrate those 4 into 0100? please help...
PIC16F877A has an internal USART module that will do all of things that you need.
you should only configure USART of PIC16F877A and define a simple communication protocol.
if you are using MicroC, you can use library functions to setup an UART communication (its the simplest manner).