Sadlercomfort
Ash
Hi Guys,
I'm using a PIC16F877 40-Pin, MPLAB and Hi-Tech C compiler.
I'm trying to use both an RB0/INT interrupt and PORTB (RB7:RB4) interrupt but keep getting the error: multiple interrupt functions (_INT_ISR and _ISR) defined for device with only one interrupt vector
Here's the two interrupt functions:
Both work individually but not together, I have read somewhere that I need to use GIEH =1 and GIEL=1, but these aren't recognised by the compiler. The PIC datasheet and the INTCON bits do say GIE/GIEH so I know its possible.
Any idea's what I'm supposed to do to set the priority?
Thanks Ash
I'm using a PIC16F877 40-Pin, MPLAB and Hi-Tech C compiler.
I'm trying to use both an RB0/INT interrupt and PORTB (RB7:RB4) interrupt but keep getting the error: multiple interrupt functions (_INT_ISR and _ISR) defined for device with only one interrupt vector
Here's the two interrupt functions:
Code:
void interrupt ISR(void)
{
if(RBIF) //If interrupt flag bit is 1
{
a = 1;
RBIF = 0; //Clear flag bit
}
}
void interrupt INT_ISR(void)
{
if(INTF) //If interrupt flag bit is 1
{
a = 2;
INTF = 0; //Clear flag bit
}
}
Both work individually but not together, I have read somewhere that I need to use GIEH =1 and GIEL=1, but these aren't recognised by the compiler. The PIC datasheet and the INTCON bits do say GIE/GIEH so I know its possible.
Any idea's what I'm supposed to do to set the priority?
Thanks Ash