Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

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
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?
 

aProgrammer

Full Member level 2
Joined
Mar 29, 2001
Messages
149
Helped
23
Reputation
44
Reaction score
13
Trophy points
1,298
Location
Syldavia
Activity points
610
I think if you wish disable INT2 interrupt
you should use something like :
INTCON3bits.INT2IE = 0;
 

darktangent

Junior Member level 2
Joined
Oct 17, 2010
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,435
sorry i wrote it wrong in the OP. I am using INTCON3bits.INT2IE = 0;
 

darktangent

Junior Member level 2
Joined
Oct 17, 2010
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,435
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?
 

qwertyuiop415263

Full Member level 4
Joined
Mar 26, 2010
Messages
232
Helped
50
Reputation
102
Reaction score
39
Trophy points
1,308
Location
Pakistan
Activity points
2,414
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
 

darktangent

Junior Member level 2
Joined
Oct 17, 2010
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,435
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.
 

cubanflyer

Full Member level 5
Joined
Jul 31, 2010
Messages
255
Helped
75
Reputation
152
Reaction score
71
Trophy points
1,308
Location
UK
Activity points
2,501
Have you tried to clear the INT2IF before you set the GIE, just a thought
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top