Here is an abstract of 18f4550's datasheet ; 9.0 interrupts , on page 101 :
The high-priority
interrupt vector is at 000008h and the low-priority
interrupt vector is at 000018h.
Here some registers controlling interrupts of UART :
IPR1bits.RCIP=1; //priority of UART interrupt :1==high
PIR1bits.RCIF=0;//erase interruption flag if set
PIE1bits.RCIE=1;//enable interrupt on UART reception
If setting PIR1bits.RCIF=0;PIE1bits.RCIE=0; does not clear your porblem, the issue may be somewhere else.
Otherwise, add an interrupt code. If you use the XC8 compiler of microchip, it looks like :
//on high priority interrupt, going here
void interrupt high_isr (void)
{
if(PIR1bits.RCIF){ //receiving something, UART
//reading...
c=getcUSART ();
//doing someting...
...
PIR1bits.RCIF=0; //clearing interrupt flag, UART
}
}
//on low priority interrupt, going here
void interrupt low_priority low_isr (void)
{
}
It was slightly more tricky with compiler C18 of microchip :
void YourHighPriorityISRCode();
void YourLowPriorityISRCode();
#pragma code high_vector=0x08
void interrupt_at_high_vector(void)
{
_asm GOTO YourHighPriorityISRCode _endasm
}
#pragma code low_vector=0x18
void interrupt_at_low_vector(void)
{
_asm GOTO YourLowPriorityISRCode _endasm
}
#pragma interrupt YourHighPriorityISRCode
void YourHighPriorityISRCode()
{
...
}
#pragma interruptlow YourLowPriorityISRCode
void YourLowPriorityISRCode()
{
...
}