problem communicating uart with pic
Well your code looks OK, but do you know that microchip provides PIC18 peripheral library so you can directly use functions, instead of putting values to registers.

Following is the sample code you can use:

#include &lt;plib.h&gt;
#pragma config FNOSC = PRIPLL       
#pragma config POSCMOD = HS         
#pragma config FPLLMUL = MUL_18     
#pragma config FPLLIDIV = DIV_2     
#pragma config FPBDIV = DIV_1       
#pragma config FPLLODIV = DIV_1     
#pragma config FWDTEN = OFF         
#define SYSTEM_FREQUENCY        {define you system frequency here}
#define BAUDRATE                115200
int main()
{
 int pbFreq;
 pbFreq=SYSTEMConfigPerformance(SYSTEM_FREQUENCY);
OpenUART( UART_EN | UART_NO_PAR_8BIT | UART_1STOPBIT, UART_RX_ENABLE | UART_TX_ENABLE, (pbFreq/16/BAUDRATE)-1);
 while(1)
 {
   putsUART("Hello World.!");
 }
}