Hello all,
I am having a tricky time coding the portb on change interrupt feature on a 16f84a (using C and PICCLite) .
This is the interrupt routine that works
Notice that I am toggling the RB0 pin. Now, if I comment this line out, the RBIF interrupt seems to not get triggered. :roll:
Any insights would be greatly appreciated.
Thanks for your help
Spiros
I am having a tricky time coding the portb on change interrupt feature on a 16f84a (using C and PICCLite) .
This is the interrupt routine that works
Code:
static void interrupt isr(void)
{
// TMR0 interrupt handler
if(T0IF) {
RB0 ^= 1;
if(EnableMotors) {
PulseCounter++;
if(PulseCounter == PULSE_MAX) {
PULSE_MOTORS=1;
PulseCounter = 0;
}
}
// reset timer0
T0IF=0;
}
// handcontroller interrupt on PORTB
if(RBIF) {
RBIF = 0;
CheckPaddle = TRUE;
}
}
Notice that I am toggling the RB0 pin. Now, if I comment this line out, the RBIF interrupt seems to not get triggered. :roll:
Any insights would be greatly appreciated.
Thanks for your help
Spiros