Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

C18 interrupt help

Status
Not open for further replies.

rahulcet

New Member
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
 
Last edited:
Me too

I need help but in my case I just want money. I need it now, boys and girls. Not fast but right now!

Please consider sending three thousand euros for a start.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top