Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

Latest threads

New Articles From Microcontroller Tips

Back
Top