Вы здесь

Debounce Filter

Contact bounce may cause faulty level changes and sending numerous events. To avoid it, the DLN-series adapters support a debounce filter. The debounce filter accepts a new signal level only if it is stable for a predefined period of time (Debounce interval).

A pulse shorter than the specified debounce interval is automatically rejected:

Debounce is ignored

A pulse longer than the debounce interval is accepted:

Debounce is accepted

If events are configured for the corresponding input pin, they will only be generated after the debounce filter accepts the level change.

The Debounce interval is the same for all pins.You can change it by using the DlnGpioSetDebounce() function. The Debounce interval is specified in microseconds (µs). If a DLN-series adapter does not support the specified value, it rounds it up to the nearest supported value.

You can switch the debounce filter on/off for each pin individually. To switch it on, use the DlnGpioPinDebounceEnable() function. To switch it off, use the DlnGpioPinDebounceDisable() function. If a pin is not assigned to the GPIO module, your settings are saved in the internal memory and will be applied when you assign the pin to the GPIO module.

By default, the debounce filters are disabled on all pins.

The debounce Filter feature is not available for the DLN-1, DLN-2 adapters.

Use the following GPIO Interface functions to control and monitor the debounce filter:

DlnGpioPinDebounceEnable()

Enables the Debounce Filter on a pin.

DlnGpioPinDebounceDisable()

Disables the Debounce Filter on a pin

DlnGpioPinDebounceIsEnabled()

Determines whether the Debounce Filter is enabled on a pin.

DlnGpioSetDebounce()

Configures the debounce interval (the minimum duration of pulses to be accepted).

DlnGpioGetDebounce()

Retrieves the debounce interval value.

Rating: 
Средняя: 3 (2 оценок)

Языки

Вход на сайт