S Suraj143 Active Member Nov 23, 2010 #1 I want to detect high to low transition on GP2 external interrupt in PIC12F675. The problem is I want to detect this situation without going to the ISR routine.I want to do this by polling. There is no any bit to disable the "GP2 external interrupt"
I want to detect high to low transition on GP2 external interrupt in PIC12F675. The problem is I want to detect this situation without going to the ISR routine.I want to do this by polling. There is no any bit to disable the "GP2 external interrupt"
C colin55 Well-Known Member Nov 23, 2010 #2 btfsc gpio,2 goto $+XX ;GP2 is HIGH next instruction next instruction
P Pommie Well-Known Member Most Helpful Member Nov 24, 2010 #3 colin55 said: btfsc gpio,2 goto $+XX ;GP2 is HIGH next instruction next instruction Click to expand... Bit 2 is the timer interrupt. For an interrupt on a falling edge, option_reg,6 (intedg) needs to be set and then you can poll intcon,1 (intf). Don't forget to clear it once it's set. Mike.
colin55 said: btfsc gpio,2 goto $+XX ;GP2 is HIGH next instruction next instruction Click to expand... Bit 2 is the timer interrupt. For an interrupt on a falling edge, option_reg,6 (intedg) needs to be set and then you can poll intcon,1 (intf). Don't forget to clear it once it's set. Mike.