GP2/INT External Interrupt

Status
Not open for further replies.

Suraj143

Active Member
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"
 
btfsc gpio,2
goto $+XX ;GP2 is HIGH
next instruction
next instruction

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.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…