![]() |
INT2 and INT3 interrupts not working
For some reason, INT2 and INT3 are not working for me. I'm incrementing a variable inside the if (INTCON3bits.INT2IF)... block in the interrupt handler (same for the INT3 if block), but the variable never changes. I know the digital inputs are changing value when I open and close them, and I know the RBIF interrupts are working, but INT2 and INT3 don't respond. Does anyone have some advice?
~Aaron |
never mind...
YAY! I FIXED IT! If you're having the same problem, read this:
INT2 and INT3 (the interrupts on digital inputs 1 and 2) ARE NOT ENABLED BY DEFAULT!!!!! INTCON3bits.INTXIE, the bit that controls whether INTX is enabled (where X is 2 or 3 and probably 1 or 0 as well), is set to 0 by default! You have to change it before the interrupts will work. If everyone knows this already, feel free to delete this thread, moderator. If this is a problem people might run into, on the other hand, it might be best to leave it up. ~Aaron :D :D :D |
Re: INT2 and INT3 interrupts not working
Glad you got it working, but where were you able to find out which interupts went with which inputs? I've been trying to find out which PIC ports are which digital inputs for the past week!
|
Re: INT2 and INT3 interrupts not working
Quote:
RC Dig I/O 2 = RB3 (INT3) RC Dig I/O 3 = RB4 (RBIF) RC Dig I/O 4 = RB5 (RBIF) RC Dig I/O 5 = RB6 (RBIF) RC Dig I/O 6 = RB7 (RBIF) |
Re: INT2 and INT3 interrupts not working
Quote:
-Kevin |
| All times are GMT -5. The time now is 13:45. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi