PIC18F47K40 Interrupt issue on Falling Edge

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
Vor503
Posts: 7
Joined: Tue Dec 08, 2020 9:58 am
Contact:

PIC18F47K40 Interrupt issue on Falling Edge

Post 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
Attachments
Interrupt_Falling_Edge.fcfx
(11.97 KiB) Downloaded 118 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: PIC18F47K40 Interrupt issue on Falling Edge

Post by medelec35 »

Hi Rov,
If it was me I would use the method within the modified flowchart.
Attachments
Interrupt_Falling_Edge v2.fcfx
(12.8 KiB) Downloaded 127 times
Martin

Vor503
Posts: 7
Joined: Tue Dec 08, 2020 9:58 am
Contact:

Re: PIC18F47K40 Interrupt issue on Falling Edge

Post 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

Post Reply