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

PortB-Interrupt

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







PortB-Interrupt
PostPosted: Tue Jul 12, 2005 5:08 am     Reply with quote

Hi,

i use the interrupt on change on portb. I detect the signals on portb4-portb7.

in the interrupt-routine #int_rb i detect the changes on portb.

BUT:

the interrupt_flag RBIF will be cleared at the end of the routine.

What is if i get signal during the interupt - routine, but the RBIF is set and only cleraed at the end!

Do you think I will get a loss of data??


Best wishes,

Mike
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Tue Jul 12, 2005 6:31 am     Reply with quote

That's why you keep the interrupt as short as possible. You can also use the NOCLEAR option and clear the flag yourself at the begining of the routine.
Ttelmah
Guest







PostPosted: Tue Jul 12, 2005 6:35 am     Reply with quote

Remember also, that you must read the port, before resetting the flag.

Best Wishes
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