Wiki

The most recent version of this page is a draft.DiffThis version (10 May 2021 16:16) was approved by Prasad Kamath.The Previously approved version (10 May 2021 15:15) is available.Diff

This is an old revision of the document!


Click here to return to the GPIO Conditioning page

Software debounce



Description


The contacts of mechanical switches and encoders can “bounce” when changing positions; meaning the voltage may fluctuate between states several times during the transition period. When the transition is not clean erroneous states can be set in your system. This block debounces (removes the transition ripple) from a signal, by waiting a specified amount of time between sampling periods. This provides a clean transition signal to the output.

Usage


Typically, this block is used to debounce a GPIO input signal. To use this block, drag it into the schematic and connect the input to a GPIO signal. The debounce time control sets the time constant for the debouncer, in samples; the default is 20. For best results adjust the value by trial and error for whatever hardware is connected to the GPIO input.

Targets Supported

NameADSP-214xxADSP-215xx/ADSP-SC5xxADAU145x/1456x
—————————————-——————————————————————————————--——————————————-
Software debounce Not supported Not supported Sample


Pins

Input

NameTypeDescription
——————————————————————————————————————
Input0AudioAudio input to the software debounce

Output

NameTypeDescription
———————-——————————————————————————————————--
Output0AudioAudio output from the software debounce


Configurable Parameters

GUI Parameter NameDefault ValueRangeFunction Description
—————————————- ———————- ————————————- —————————————-
CountMax20[0, 1000]Sample counter for the Debounce time on the Rotary Encoder


DSP Parameters

Parameter NameDescriptionADAU145x/ADAU146x
—————————-——————————————————————————————————- ———————————
countmaxTime constant for the debouncer Fixed Point 32.0


DSP Parameter Computation


Not applicable

resources/tools-software/sigmastudiov2/modules/gpioconditioning/softwaredebounce.1620656184.txt.gz · Last modified: 10 May 2021 16:16 by Prasad Kamath