CONFIG DEBOUNCE/de
(Difference between revisions)
(→(**COPIED FROM ENGLISH PAGE**) =) |
(→Remarks) |
||
Line 15: | Line 15: | ||
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> | ||
− | = <span class="f_Header"> | + | = <span class="f_Header">Anmerkungen</span> = |
<div style="padding: 0px; margin: 0px 0px 0px 4px;"> | <div style="padding: 0px; margin: 0px 0px 0px 4px;"> | ||
{| width="568" cellspacing="0" cellpadding="1" border="1" style="border: 2px solid rgb(0, 0, 0); border-spacing: 0px; border-collapse: collapse;" | {| width="568" cellspacing="0" cellpadding="1" border="1" style="border: 2px solid rgb(0, 0, 0); border-spacing: 0px; border-collapse: collapse;" | ||
|- style="vertical-align: top;" | |- style="vertical-align: top;" | ||
| valign="top" width="15%" style="width: 81px; border: 1px solid rgb(0, 0, 0);" | | | valign="top" width="15%" style="width: 81px; border: 1px solid rgb(0, 0, 0);" | | ||
− | + | time | |
| valign="top" width="100%" style="width: 478px; border: 1px solid rgb(0, 0, 0);" | | | valign="top" width="100%" style="width: 478px; border: 1px solid rgb(0, 0, 0);" | | ||
− | + | Numerische Konstante welche die Wartezeit in mS festlegt. | |
− | + | Die maximale Wartezeit ist 65535. | |
|} | |} | ||
Line 31: | Line 31: | ||
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> | ||
− | + | Wenn die Wartezeit nicht konfiguriert wird dann wird der Standardwert 25 ms verwendet. | |
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> |
Revision as of 01:40, 5 March 2013
Contents |
Funktion
Konfiguriert die Wartezeit für den DEBOUNCE-Befehl.
Syntax
CONFIG DEBOUNCE = time
Anmerkungen
time |
Numerische Konstante welche die Wartezeit in mS festlegt. Die maximale Wartezeit ist 65535. |
Wenn die Wartezeit nicht konfiguriert wird dann wird der Standardwert 25 ms verwendet.
See also
Example
'----------------------------------------------------------------------------------------- 'name : deboun.bas 'copyright : (c) 1995-2005, MCS Electronics 'purpose : demonstrates DEBOUNCE 'micro : Mega48 'suited for demo : yes 'commercial addon needed : no '----------------------------------------------------------------------------------------- $regfile = "m48def.dat" ' specify the used micro $crystal = 4000000 ' used crystal frequency $baud = 19200 ' use baud rate $hwstack = 32 ' default use 32 for the hardware stack $swstack = 10 ' default use 10 for the SW stack $framesize = 40 ' default use 40 for the frame space Config Debounce = 30 'when the config statement is not used a default of 25mS will be used 'Debounce Pind.0 , 1 , Pr 'try this for branching when high(1) Debounce Pind.0 , 0 , Pr , Sub Debounce Pind.0 , 0 , Pr , Sub ' ^----- label to branch to ' ^---------- Branch when P1.0 goes low(0) ' ^---------------- Examine P1.0 'When Pind.0 goes low jump to subroutine Pr 'Pind.0 must go high again before it jumps again 'to the label Pr when Pind.0 is low Debounce Pind.0 , 1 , Pr 'no branch Debounce Pind.0 , 1 , Pr 'will result in a return without gosub End Pr: Print "PIND.0 was/is low" Return
Languages | English • Deutsch |
---|