diamel wrote on Friday, July 06, 2012:
when i enter in the interrupt (the program work and enter when the USART receive data) i put the PIR1bits.RCIF=0 for wait a new reception, but i can’t put the register in 0 is ever en 1 and the interrupt is ever entering even when i’m not receiving data.
#pragma interrupt vSerialRxISR
void vSerialRxISR( void )
{
PIR1bits.RCIF=0;
if(PIR1bits.RCIF==0)
{
putsTX(“PIR1bits.RCIF=0\r”,16);
}
if(PIR1bits.RCIF==1)
{
putsTX(“PIR1bits.RCIF=1\r”,16);
}
}
the program is printing PIR1bits.RCIF=1 even when i change the value before of the if.
i hope someone can helpme =)