pic 16f877a with xbee

i’d like to connect the xbee to the pic 16f877a

at the receiver r side

i tried to connect the DO pin from xbee to the rx pin in pic

and wrote the built in code of uart of mikro c on the pic

but no response

any help

how to configure the xbee to recive the data and put it in the pic

and how to read it on pic

mokh:
i’d like to connect the xbee to the pic 16f877a

at the receiver r side

i tried to connect the DO pin from xbee to the rx pin in pic

and wrote the built in code of uart of mikro c on the pic

but no response

any help

how to configure the xbee to recive the data and put it in the pic

and how to read it on pic

is the PIC running on 3.3V so that the UART signals are compatible?

You have DO->RX on PIC, but do you have the reverse path wired?

common Ground wired?

PIC baud rate correct?

XBee tested OK plugged into a board that can interface to a PC to run XCTU?

Also, have you gotten the 16F877 serial working to the PC (which an RS232 level translator)?

If not do this before connecting the XBees.

i programmed my pic 16f877a

with these mikroc 6 ALSO i use xbee regulated board

(is that a must to include files ? and if yes what file should i include)

RECIRVER:

unsigned short i;
unsigned short data = 0, ro = 0;
unsigned short *rec;
void main() {
                    // initialize USART module
      PORTC = 0;
      TRISC = 0B10000000;
      PORTB = 0;
      TRISB = 0;
      PORTB = 0b10100000;
      rec = &ro;
      Soft_Uart_Init(PORTC,7,6,9600,0) ;
do{
   do  {
     data = Soft_Uart_Read(rec);
     PORTB = 0B00010000;
   
    }
     while (!*rec);

/* Now we can work with data: */
if (data==0XFF)
{
       PORTB = 0B11110000;
      Delay_ms(1000) ;
//if (data==0XEE) // i put this useless condition as i must use the write function "Soft_Uart_Write(data)" associated to 
                            //read function" Soft_Uart_Read(rec);" as i knew
//{
   //   Soft_Uart_Write(data);
//}
}

else  {PORTB = 0B11000000;
Delay_ms(1000)        ;
}
   }
while (1)  ;
}//~!

i am using port B(from 4 to 7) as output leds