InterruptIn false triggering

06 Aug 2010

Hello,

I am using a series of buttons connected to pins 11, 12, 13 and 14 of the mbed board. I have InterruptIn objects using these pins, the pins are set to PullDown, and (finally) a function is attached to be called on a rising edge. The buttons are normally open, connecting to the positive rail when pressed.

It seems that the attached functions are called immediately unless I wire the inputs to ground myself. It seems another user had a similar problem ( http://mbed.org/forum/mbed/topic/379/ ), but they only had the first attached function being called, in my case they all seem to. The first and fourth input are attached to functions which (currently) do nothing, but the second and third are definitely triggering.

Has anyone had a similar issue, or could offer any advice?

Thank you

13 Aug 2010

Let's see the code you wrote.

/ Lerche

14 Aug 2010

I had a similar problem when attaching a GPS 1PPS signal directly to the embed. My solution was to add a FET between the two, pullup the Mbed pin and invert the edge that the interrupt trigger on. Works fine now.

07 Sep 2010

It seems I can't reproduce this in a simpler test case, so I'm going to put it down to user error. Not entirely sure how, but at this point it seems it must have been.

07 Sep 2010 . Edited: 07 Sep 2010

Use pulldown resistors.
These can be configured by software, i.e.

button.mode(PullDown);

 

This should probably do the trick.

Too quick reading, sorry... Saw that you PullDown.