Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to test a debounce filter

Status
Not open for further replies.

nicky.r

Junior Member level 1
Joined
Jan 12, 2011
Messages
18
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,408
Hello,

I have to verify/test the functionality of a debounce filter with a time constant from 10 to 255ms.
Could you please give sugestions on how to do this test.
 

Hi;

Only an idea (USING a microcontroller):

Write a simple interrupt routine to sense the key pressing.
It must be as short as possible: only increments a byte var (counter) and sets a bit var (a flag)

Outside:
first clear the counter and the flag
init and enable the IT

then wait for the flag in a loop
press the key now
if the flag is set: exit loop
then delay say 200 mS
then read the counter
then stop the test program (or try again : - )

If your debouncing circuit (hw RC filter) is working as well, the counter must be 1 (one)
else it will be greater as 1 because of the contact's bounce..


What do you think?
zuisti
 
Hi,

Thanks for your helpful suggestion.I believe that the debounce time of a keypress is 10 ms.How can I give an input whoes debounce time is more(say 200ms) ?,inorder to test the filter time constant range of 10ms to 200ms. How can I vary the debounce time of the input.

Thanks
 

I believe that the debounce time of a keypress is 10 ms.How can I give an input whoes debounce time is more(say 200ms) ?,inorder to test the filter time constant range of 10ms to 200ms. How can I vary the debounce time of the input.

Hi;
The suggested program is for test only (it's a measuring program, NOT a
software debouncing !!!!) And it's working in range 0...200 mSec. You can
easily increase this range: simply use a bigger delay after the loop.

You have a hardware debouncing circuit (a simple RC filter), right?
In this case you can vary the filter time constant as usual, for example the
increasing of the resistor value causes a greater time constant ...

Try it out: without RC filter you will get 5-10 counts (or more) using the program.

BTW a key bounce time is NEVER longer as 30 mSec (it's usually 5-10 mSec).
 

Hi,


I meant to ask if I can vary the bounce time of the Keypress.But as you said, it is some fixed value which is normally not greater than 30ms.So can I give some input other than a keypress whoes bounce time is close to 250ms.

Thanks a lot
nicky
 

Yes, you can. For example with a gated pulse (burst) generator circuit:

!_!_!_!_!_!___________________________
<..burst..>
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top