Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

InterruptPort please stop interrupting me! Help.....


  • Please log in to reply
4 replies to this topic

#1 Omar (OZ)

Omar (OZ)

    Advanced Member

  • Members
  • PipPipPip
  • 564 posts

Posted 11 December 2010 - 08:26 PM

Hello, I made an interrupt port for use with a button.Sometimes when I press the button it triggers the interrupt event twice or thrice. What is wrong?

#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 11 December 2010 - 09:03 PM

Hi Omar, This sounds like "glitching," which is pretty common in buttons. Two options: 1. Set the GlitchFilter property to true in the InterruptPort constructor. 2. If the built-in GlitchFilter doesn't offer enough debouncing, add a bit of extra circuitry to your button circuit to smooth things out. Or add in additional software-based glitch filtering (i.e. ignore any signals until they're stable for a millisecond or such). Chris

#3 klotz

klotz

    Advanced Member

  • Members
  • PipPipPip
  • 60 posts

Posted 13 December 2010 - 12:29 AM

I found that when using the tactile miniswitches, http://www.sparkfun.com/products/97 , if I add a 0.1 mF cap from the signal line to gnd and enable the pull-up resistor cleans up the interupts just fine.

#4 Omar (OZ)

Omar (OZ)

    Advanced Member

  • Members
  • PipPipPip
  • 564 posts

Posted 13 December 2010 - 01:07 AM

I found that when using the tactile miniswitches, http://www.sparkfun.com/products/97 , if I add a 0.1 mF cap from the signal line to gnd and enable the pull-up resistor cleans up the interupts just fine.

Thanks I'll try that

#5 Omar (OZ)

Omar (OZ)

    Advanced Member

  • Members
  • PipPipPip
  • 564 posts

Posted 13 December 2010 - 01:08 AM

Hi Omar,

This sounds like "glitching," which is pretty common in buttons.

Two options:
1. Set the GlitchFilter property to true in the InterruptPort constructor.
2. If the built-in GlitchFilter doesn't offer enough debouncing, add a bit of extra circuitry to your button circuit to smooth things out. Or add in additional software-based glitch filtering (i.e. ignore any signals until they're stable for a millisecond or such).

Chris

Tried #1, it didn't help much, I added software-based glitch filtering and that helped quite a bit, thanks




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.