CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

RB interrupt problem

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
esakki



Joined: 27 Aug 2008
Posts: 7

View user's profile Send private message

RB interrupt problem
PostPosted: Mon Aug 17, 2009 3:23 am     Reply with quote

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







PostPosted: Mon Aug 17, 2009 4:57 am     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Aug 17, 2009 2:13 pm     Reply with quote

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)."
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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