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

pin specific interrupt

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



Joined: 21 Jan 2011
Posts: 1

View user's profile Send private message

pin specific interrupt
PostPosted: Fri Jan 21, 2011 4:09 pm     Reply with quote

I understand how the Port specific interrupt works, but I want a pin specific interrupt on change.

This was generated automatically by the wizard:
Code:

#int_EXT
void  EXT_isr(void)
{
// Call LED routine
// clear flag
}

But I believe this is a general if any pin changes interrupt?
If I wish the interrupt to be specific to A2 on pic 16f1823, is there something else to add?

Can I state just #int_EXTRA2 as that 1st line?
temtronic



Joined: 01 Jul 2010
Posts: 9243
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Jan 21, 2011 5:26 pm     Reply with quote

You HAVE to read the info on the PIC you're using! Check the chapters on the physical pins and their uses, also the section on Interrupts.
The newer PICs have more 'options', but you'll have to read the information. I'm currently using the PIC16F88 and it doesn't have individually addressable interrupt capability (though a few lines of code can accomplish it...).
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Jan 21, 2011 5:45 pm     Reply with quote

Quote:
Can I state just #int_EXTRA2 as that 1st line?

You can't invent stuff. Look at the end of the 16F1823.h file for a list
of allowable interrupt directives.


Quote:

#int_EXT
void EXT_isr(void)
{
}

But I believe this is a general if any pin changes interrupt?

It's for pin A2 only.
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