[simpits-tech] keybounce

Charles Morford netnurd at msn.com
Wed Sep 17 18:32:34 PDT 2003


>From a purely software point of view you have to sample the keys for a change of state on an
input line. Perform a timing loop of x milliseconds and if the condition still exist its probably valid
data. A bit simplistic but you get the idea.

Scan input for change
Any Change?-----Yes Loop for milisec-----Still Changed?-----Yes data valid/perform function and exit.

You could also set a register or variable with data if its not single I/o pins your looking at like hex data. 
You would sample and check for non 0 logic. when the logic is anything but 0 you store the value, loop
for milisec, then compare current value to stored value. If stored value is equal to currently read value>0 then valid data. perform function and clear variable.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns2.simpits.org/pipermail/simpits-tech/attachments/20030917/61b6ad45/attachment.html


More information about the Simpits-tech mailing list