Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Interrupts Help ! I am stuck with this Issue

Not open for further replies.


Junior Member level 2
Oct 17, 2010
Reaction score
Trophy points
Activity points

I am facing a problem in programming for interrupts. I want the interrupts to work for serial communication. For this i have enabled Global interrupts, Perriferal Interrupts and receive transmit INT in my Microcontroller.

Now the problem is that INT2 which i was using to receive some data has also started to behave as an interrupt and does not perform its function.

If i disable the global interrupts, it starts working perfectly.

Now, i have tried disabling the INT2 interrupt by using the following command

INTCON3bits.INT3IE = 0;

But of no use... The interrupt is still ON.

What should i do?

I think if you wish disable INT2 interrupt
you should use something like :
INTCON3bits.INT2IE = 0;

sorry i wrote it wrong in the OP. I am using INTCON3bits.INT2IE = 0;

I am not using INT2, I am using RB2 for an input and show that input at RA0. Now when Peripheral interrupt is turned off, it completes it function that is shows the input at rb0 but when peripheral interrupt is turned on by me, it stops functioning..

Any Idea?

When you make rb2 as an input it can be configured as an interupt pin and cause problem(once i have same problem). Use PortD pin instead of RB2 will solve your problem

hope it helps

I can use Pin D. I have to do some thing with the same pin. Any suggestions about what the problem is?

---------- Post added at 20:04 ---------- Previous post was at 20:00 ----------

I Can't use PIN D, i have to do something with RB2.

Have you tried to clear the INT2IF before you set the GIE, just a thought

Not open for further replies.

Part and Inventory Search

Welcome to