Page 1 of 1

PIC18F47K40 Interrupt issue on Falling Edge

Posted: Sat Dec 26, 2020 10:15 am
by Vor503
Hi all.
If I use an Interrupt active on Falling Edge on INT0 Pin with a 5,6 Kohm pull-up resistor and a normally open push button from INT0 Pin and ground, as soon as I power the Pic, the Interrupt get fired, even if I don't press the push button. Tryed some delay before the interrupt's icon but the problem was still present (500 mS and 1 sec.).
If I reverse the logic, with Interrupt active on Rising edge, a pull down resistor and the push button from the INT0 Pin and +5 Volt, the problem disappears.
The same for INT1.
Tested on real Hardware. Attached a very simple program that turns on a led when the interrupt get fired.
Can someone tell me why and if I'm doing something wrong?

Thanks
Rov

Re: PIC18F47K40 Interrupt issue on Falling Edge

Posted: Sat Dec 26, 2020 12:32 pm
by medelec35
Hi Rov,
If it was me I would use the method within the modified flowchart.

Re: PIC18F47K40 Interrupt issue on Falling Edge

Posted: Sat Dec 26, 2020 1:36 pm
by Vor503
Hi Martin and many thanks for the very smart idea: it works !
However, I don't understand the reason for the issue, but it is more important to solve it...

Best regards
Rov