Hi,
I'm using PIC16f877, writing a simple ISR, but it keeps on looping within ISR, if i set PEIE, though beforehand i've reset all interrupts flags.
Could anyone shed some light?
thanks!
I'm using PIC16f877, writing a simple ISR, but it keeps on looping within ISR, if i set PEIE, though beforehand i've reset all interrupts flags.
Could anyone shed some light?
Code:
INTE = 0;
init_uart(); // set RCIE and TXIE
reset_IF(); // reset all interrupt flags
GIE = 1;
PEIE = 1; // keeps on looping if i set PEIE <-- problem here
__enable_interrupt();
while(1)
{
while( ReceivedCount < 50) // guard condition for every ISR done
{
do_foreground_process();
}
}
Last edited: