Searching \ for 'Best DEBOUNCE - DEBOUNCE - DEBOUNCE _|-|_|-|_|___' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/index.htm?key=best+debounce+debounce
Search entire site for: 'Best DEBOUNCE - DEBOUNCE - DEBOUNCE _|-|_|-|_|___'.

Truncated match.
PICList Thread
'Best DEBOUNCE - DEBOUNCE - DEBOUNCE _|-|_|-|_|___'
1998\11\06@090044 by Ultra Control Sdn. Bhd.

flavicon
face
Anyone for the old Debouce challege:

I hooked a push to make switch at RA1 of a PIC16F84.
The other end to the ground. And connected to the +VDD is a 15KOhm
resistor.
What is the fool proof way to read the key? I used the code below with
inconsistent result although is does work. Or any recommendation of a
cheap hardware
configuration. WWW site welcome.

SCAN      MOVLW 0XFF               ;Init Port A as input
                TRIS PORTA                  ;

KEY_LO  BTFSC   PORTA, 1        ;Key Press down = 0
                GOTO KEY_LO             ;Keep scan till LO detected
                CALL DELAY                 ;Debouce, dont scan for
~500msec
                CALL DELAY                 ;
                CALL DELAY                 ;
                CALL DELAY                 ;
KEY_RLS  BTFSS PORTA, 1           ;Key Release
                  GOTO KEY_RLS

rgds
-pklee

1998\11\06@135257 by Scott Dattalo

face
flavicon
face
On Fri, 6 Nov 1998, Ultra Control Sdn. Bhd. wrote:

{Quote hidden}

I'm not sure what you're seeking, but you oughta check out my web page:


http://www.interstice.com/~sdattalo/technical/software/pic/debounce.html

It's better suited for simultaneously debouncing 8 inputs.

Scott

1998\11\06@232557 by Matthew Ballinger

picon face
You may want to use 20 or 30 ms. 500 ms may be a bit too long. Depending on
the app you may want to go on the app then check the key again. I've found
little reason to wait on the key in most cases, but again that depends on your
application. I personally think key debouce is over rated. Unless the key is
processed within 5 or 6 ms, forget about it. I'll probably have a lot of
critics on this opinion, but it works for me. Good luck. Matt.

1998\11\07@142742 by paulb

flavicon
face
Ultra Control Sdn. Bhd. wrote:

> Anyone for the old Debouce challege:

 Hmmmm.

> What is the fool proof way to read the key? I used the code below with
> inconsistent result although is does work.

 Code reduces to:
   Wait for key_down
   Delay 50ms
   Wait for key_up

 I substituted 50ms since, as others have noted, it«s more like a
useful debounce period.  First problem I see is that if your operation
executes and loops back very fast, the "release" bounce will trip the
wait for key_down immediately.  You may therefore wish to put a second
delay in the loop somewhere.

 The only other matter I notice is that I very rarely think of waiting
for one keypress as the only function of the system ("Busy wait").  This
is significant as the "other" jobs you may want to do whilst waiting
often provide a very useful debounce delay.

 The Stamp code "BUTTON" uses this beautifully.  Look at
   http://www.dontronics.com/see.html#button  for ideas.

> Or any recommendation of a cheap hardware configuration.

 Cheap?  Ha!  Cheapest is (usually) software!
--
 Cheers,
       Paul B.

1998\11\07@150715 by Dave Johnson

flavicon
face
>> Or any recommendation of a cheap hardware configuration.
Two cross-coupled gates (really a SR flip-flop) or a single non-inverting
buffer with out tied to in are "classic" hardware debouncers (for SPDT
switches), and cost only the price of coupla logic gates: a few cents.

But software may be cheaper, depending on the cost of your time :-)

Dave Johnson

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...