Iam very much stuck with how to use C18 with Interrupts. I simply wrote a pgm to go to an ISR when the RBO pin goes high. I have the code here which I succesfully compiled.
#include<p18f458.h>
#pragma config WDT=OFF
#pragma config OSC=HSPLL
#pragma config LVP = OFF
#pragma config PWRT = OFF
void interrupt()
{
blah blah;
INTCON=0b11110000;//make GIE one and flag low for next int to be detected
}
void main()
{
TRISB=0x01;
INTCON=0b11010000;//initialize interrupts for RBO low to high transition
INTCON2bits.INTEDG0=1;//interrupt
while(1)
{
blah blah;
}
}
Please do help me. When i give the trigger using stimulus worksapce when using mplab sim the control(the arrow) is not going to the ISR. In other words the interrupt is being accepted (which I understood from the fact that the RBOIF flag was being set by the processor), but the ISR is not routed. iam in a real fix. I have spent hours with this little pbm. this is the first time iam working with 18 f ints.
please do help me
thanks in advance