debounce.9

来自「CNC 的开放码,EMC2 V2.2.8版」· 9 代码 · 共 44 行

9
44
字号
.TH DEBOUNCE "9" "2007-01-16" "EMC Documentation" "HAL Component".de TQ.br.ns.TP \\$1...SH NAMEdebounce \- filter noisy digital inputs.SH SYNOPSIS.B loadrt debounce [cfg=\fIsize[,size,...]\fB].PCreates filter groups each with the given number of filters (\fIsize\fR).  Eachfilter group has the same sample rate and delay..SH DESCRIPTIONThe debounce filter works by incrementing a counter whenever the input is true,and decrementing the counter when it is false.  If the counter decrements tozero, the output is set false and the counter ignores further decrements.  Ifthe counter increments up to a threshold, the output is set true and thecounter ignores further increments.  If the counter is between zero and thethreshold, the output retains its previous state.  The threshold determines theamount of filtering: a threshold of 1 does no filtering at all, and a thresholdof N requires a signal to be present for N samples before the output changesstate.  .SH FUNCTIONS.TP.B debounce.\fIG\fRSample all the input pins in group G and update the output pins..SH PINS.TP.B debounce.\fIG\fB.\fIF\fB.in\fR bit inThe F'th input pin in group G.  .TP.B debounce.\fIG\fB.\fIF\fB.out\fR bit outThe F'th output pin in group G.  Reflects the last "stable" input seen on thecorresponding input pin..SH PARAMETERS.TP.B debounce.\fIG\fB.delay\fR signed rwSets the amount of filtering for all pins in group G.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?