I need help in understanding how a state change interrupt works. More specifically, what kind of event can create a state change.
My specific example is, a PIC micro powered with 5V to Vdd, and a switch to a port B pin that is normally open (at 0V). Will throwing the switch to supply that Port B pin with +5V be considered a "state change"?
If that does induce a state change, would it essentially make that bit go from 0 to 1 assuming the voltage remains constant until the switch is thrown again?
If yes, can I tell the the software to: (paraphrasing here)
run normal program
test port b pin skip if 0
if 1 (voltage applied) goto a subroutine
if 0 continue normal program
I understand the need to enable interrupts in the INTCON register and also clear any interrupt flags after the interrupt is complete.
Thanks
My specific example is, a PIC micro powered with 5V to Vdd, and a switch to a port B pin that is normally open (at 0V). Will throwing the switch to supply that Port B pin with +5V be considered a "state change"?
If that does induce a state change, would it essentially make that bit go from 0 to 1 assuming the voltage remains constant until the switch is thrown again?
If yes, can I tell the the software to: (paraphrasing here)
run normal program
test port b pin skip if 0
if 1 (voltage applied) goto a subroutine
if 0 continue normal program
I understand the need to enable interrupts in the INTCON register and also clear any interrupt flags after the interrupt is complete.
Thanks