beautypg.com

Measurement Computing WBK17 User Manual

Page 10

background image

WBK17, pg. 10

987996

WBK17, Counter/Encoder Module

Debounce times should be set according to the amount of instability expected in the input signal. Setting a
debounce time that is too short may result in unwanted glitches clocking the counter. Setting a debounce
time too long may result in an input signal being rejected entirely. Some experimentation may be required
to find the appropriate debounce time for a particular application.

To see the effects of different debounce time settings, simply view the analog waveform along with the
counter output.

Use trigger before stable mode when the input signal has groups of glitches and each group is to be counted
as one. The trigger before stable mode will recognize and count the first glitch within a group but reject the
subsequent glitches within the group if the debounce time is set accordingly. The debounce time should be
set to encompass one entire group of glitches as shown in the following diagram.

Trigger after stable mode behaves more like a traditional debounce function: rejecting glitches and only
passing state transitions after a required period of stability. Trigger after stable mode is used with electro-
mechanical devices like encoders and mechanical switches to reject switch bounce and disturbances due to
a vibrating encoder that is not otherwise moving. The debounce time should be set short enough to accept
the desired input pulse but longer than the period of the undesired disturbance as shown in the diagram
below.