|
|
View previous topic :: View next topic |
Author |
Message |
esakki
Joined: 27 Aug 2008 Posts: 7
|
RB interrupt problem |
Posted: Mon Aug 17, 2009 3:23 am |
|
|
Hi,
I am using pic16f873A controller. In this controller I am using timer0, timer1 and Port Change interrupt in my coding. All functions are working properly. The controller is reset when RB interrupt occurred. Anybody can help me for rectify this problem.
Thanks in advance,
Regards,
Anand.A |
|
|
Ttelmah Guest
|
|
Posted: Mon Aug 17, 2009 4:57 am |
|
|
Not without knowing more.
First, you must always have a handler present for every interrupt enabled. The chip would hang/reset if this isn't the case.
Second, the INT_RB interupt handler, _must_ read port B. Otherwise the interrupt will continue to occur, and if you have the watchog enabled, you would get a reset.
The way to find out what is happening, is to write a small test program that shows the fault. You should be able to write a program, with chip fuses, minimum interrupt handler, in under twenty lines. The 'odds' arte that once you do this, you will actually find the problem. However if you don't, then this is something you can post, that we can look at and either compile and test ourselves, or say 'this is what the problem is'.
Your question as currently posed, is rather like saying 'my car stops, when I turn right'. It only becomes obvious what is going on, when we learn there is a six foot high concrete wall to the right of the car....
Best Wishes |
|
|
meereck
Joined: 09 Nov 2006 Posts: 173
|
|
Posted: Mon Aug 17, 2009 2:13 pm |
|
|
it should be noted that portb supports the interrupt-on-change feature on upper 4 pins only.
From the datasheet:
"Four of the PORTB pins, RB7:RB4, have an interruption-
change feature. Only pins configured as inputs can
cause this interrupt to occur (i.e., any RB7:RB4 pin
configured as an output is excluded from the interruption-
change comparison)." |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|