Interrupts Help ! I am stuck with this Issue

Status
Not open for further replies.

darktangent

Junior Member level 2
Joined
Oct 17, 2010
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,435
Hi,

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;
 

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
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…