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?
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
Posted: Fri Jan 21, 2011 5:45 pm
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?
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