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 CCS Technical Support

problem with RB

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



Joined: 05 Dec 2006
Posts: 3

View user's profile Send private message

problem with RB
PostPosted: Tue Dec 05, 2006 6:38 am     Reply with quote

I am using 18f452 and I use 2*16 LCD which is mounted to port D upper and 4 bit
and I have a function when port b on change interrupt occurs which is mounted to my keypad
The problem is when I push a button and dont give up the interrupt occurs much more then one times and it takes intterrupt consecutively while I was pushing button when I give up pushing it run normal
Ttelmah
Guest







PostPosted: Tue Dec 05, 2006 6:56 am     Reply with quote

Are you reading portB, in your interrupt handler?.
You absolutely _must_ do this. The RB interrupt occurs, whenever the state of one of the lines, does not match the 'latched' version inside the chip. The value is latched whenever you read the port. If the latched version corresponds to the buttons being released, and the port is not read, then the interrupt will occur continuously while the button is pressed. If you read the port, it'll stop, and occur again, when the button is released. You may get several trigers though from any normal button, due to contact noise, being seen as several presses...

Best Wishes
deneme123



Joined: 05 Dec 2006
Posts: 3

View user's profile Send private message

PostPosted: Tue Dec 05, 2006 7:21 am     Reply with quote

thanks a lot you solve my problem
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