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

Interrupt-On-Change on PIC16F1933

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



Joined: 11 Feb 2011
Posts: 5

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

Interrupt-On-Change on PIC16F1933
PostPosted: Fri Feb 11, 2011 10:04 am     Reply with quote

Hello,
I need to use the interrupt on change of this chip. It has different flags for the change of each pin in Portb. My problem is I cant find out how to write the isr for each pin. I cant find the preprocessor directive to do so.
I'm using it on RB0, so it first tried #int_RB0 but that doesn't compile.
Is it possible to use this feature?
Thank You
ALPL



Joined: 29 Mar 2009
Posts: 30

View user's profile Send private message

INT on change RB
PostPosted: Fri Feb 11, 2011 11:16 am     Reply with quote

Hi, you have to use #INT_RB (for port B-pins) for your interrupt routine and then check in the interrupt routine which pin has changed its state. There is no extra #INT_RB0, etc for each single pin.

BR
ALPL
martint88



Joined: 11 Feb 2011
Posts: 5

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

PostPosted: Fri Feb 11, 2011 11:32 am     Reply with quote

Thank you for the help.
Is there any way to check the IOCBF register without using ASM?
ALPL



Joined: 29 Mar 2009
Posts: 30

View user's profile Send private message

IOCBF
PostPosted: Fri Feb 11, 2011 11:42 am     Reply with quote

Yes, you can - just add following statement at the beginning of your code (after the #include ...):

#byte IOCBF = 0x396 // located in bank 7

Then later in your code you can aread/write IOCBF like a normal variable.
martint88



Joined: 11 Feb 2011
Posts: 5

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

PostPosted: Fri Feb 11, 2011 11:51 am     Reply with quote

Thank you very much
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