Re: switch debouncing
- From: "Glenn Gundlach" <stratus46@xxxxxxxxx>
- Date: 18 Oct 2005 20:47:09 -0700
John Larkin wrote:
> On Wed, 19 Oct 2005 01:02:13 GMT, Rich Grise <rich@xxxxxxxxxxx> wrote:
>
> >On Mon, 17 Oct 2005 08:11:54 -0700, John Larkin wrote:
> >> On Mon, 17 Oct 2005 14:26:30 GMT, Fred Bloggs <nospam@xxxxxxxxxx>
> >> wrote:
> >>>Spehro Pefhany wrote:
> >>>> On Mon, 17 Oct 2005 06:12:58 GMT, the renowned Mac <foo@xxxxxxx>
> >>>> wrote:
> >>>>>Is there a standard or best way to de-bounce a switch?
> >...
> >>>>>Seems like it should work. Any comments?
> >>>>
> >>>> If it's going into a microcontroller, firmware is almost always the
> >>>> best way.
> >>>
> >>>Well, if you can arrange things with external hardware so that the
> >>>switch input is always valid, that is just that much less the firmware
> >>>has to do- especially if the switch input is a very infrequent occurrence.
> >>
> >> But firmware is free!
> >>
> >> If you sample the switch state periodically at a rate slower than the
> >> longest possible bounce time, then you don't need to do any software
> >> debouncing. Something like 5-10 Hz sample rate plays right into
> >> typematic logic if you want to do that, too.
> >>
> >Or 27.5. ;-) I'd go nuts trying to do an ASCIImatic at 5 or 10 CPS.
> >Yes, I know I'm already crazy - you know what I mean. :-)
> >
> >Cheers!
> >Rich
>
> 27.5? Speed kills!
>
> The real pita is to have a pair of up/down buttons that have to jog a
> value (or a bunch of different variables) over a huge range, like
> +-4095 or something. So a single push jogs up/down one tick, and if
> you hold it down it begins to count at an increasing rate. Damned
> nuisance to program!
>
> John
I had some 4095 range button things with a Moto 68HC05. Initial button
press counts 1. Hold for .5 sec and repeats at 10/sec. After 2 seconds
it goes to 200/second and wasn't bad to program and more importantly,
it is easy to use. 60 seconds after the last button press, the values
are written to a serial EEPROM. The long delay ensures a minimum of
write cycles without losing too many settings if power fails before the
save.
GG
.
- References:
- switch debouncing
- From: Mac
- Re: switch debouncing
- From: Spehro Pefhany
- Re: switch debouncing
- From: Fred Bloggs
- Re: switch debouncing
- From: John Larkin
- Re: switch debouncing
- From: Rich Grise
- Re: switch debouncing
- From: John Larkin
- switch debouncing
- Prev by Date: Re: switch debouncing
- Next by Date: Re: switch debouncing
- Previous by thread: Re: switch debouncing
- Next by thread: Re: switch debouncing
- Index(es):