K8055 set debounce time for digital input 3?

Hello,

Some precise details of my little project :

  • I program in VB .net with Visual Studio 2008
  • I must create 3 buttons for a quiz. when one of the button is pressed a sound is played (2 seconds), a light is turned on (2 seconds) and the 2 others buttons are blocked (2 seconds)

This kind of button oblige me to set the debounce time at 250ms for each.

It’s not a problem for digital inputs 1 and 2 because they have each a counter and I can set the correct debounce time so the program functions well for this digital inputs

The problem comes for the digital input 3 who does not have a counter so when I press this third button I’ve got plenty of signals…

I thought of several solutions, but I don’t know if it’s possible :

  • create a third counter for the digital input 3 (?)
  • to use two K8055 cards and use digital inputs 1 and 2 of the first and the digital input 1 af the second (?)

thanks a lot for any help :wink:

You may also use a software debounce:
When the button “press” is detected, start a timer (250ms) in your application.
When the timer time is elapsed, check the button status again. If still “pressed” accept it as a button press. Otherwise reject it.

Here are more debounce solutions:
maxim-ic.com/app-notes/index.mvp/id/287
eetimes.com/discussion/break … debouncers