Interrupt On change Feature for Port B "Clarification N
Posted: Mon Aug 23, 2010 8:00 pm
Hello, I am using a PIC16F886 for a small project. I notice this part
supports Interrupt On change feature for all pins on Port B
I have a button connected to RB2 and would like to run this using one
of the interrupts. I am Unclear on how to designate RB2 for use as
a interrupt so hopefully someone can clarify.
in .h File for the part at the bottom, there are pin defines and a memory address for each of the IOC features.
#define INT_RB2
So it looks like the pin is defined for the compiler. Would something
like the following code snip be the correct method to use so that the compiler knows that I wish to generate a interrupt on RB2.
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