Re: switch debouncing



On Mon, 17 Oct 2005 14:26:30 GMT, the renowned Fred Bloggs
<nospam@xxxxxxxxxx> wrote:
>>
>>
>> If it's going into a microcontroller, firmware is almost always the
>> best way.
>>
>>
>> Best regards,
>> Spehro Pefhany
>
>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.

Timer-interrupt driven periodic (in the 100-500Hz range) polling uses
negligible bandwidth of a modern processor for any reasonable number
of keys. Even if its a frequent occurence. And it can filter out
electrical noise and momentary contact breaks due to shock or
vibaration as well, if you choose to write it to do so.

There is reason to add some external hardware (especially to deal with
ESD issues and possibly with the miserably small and variable current
that on-board pullups typically deliver) but not for the deboucing.
Even a crummy on-board RC clock will yield debouncing times accurate
within a few percent at zero additional cost, and les need to test the
board for missing parts.


Best regards,
Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
speff@xxxxxxxxxxxx Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
.



Relevant Pages

  • Re: PIC A/D Weirdness
    ... >see if my RA0 is damaged, ... It could also be your firmware. ... Best regards, ... Spehro Pefhany ...
    (comp.robotics.misc)
  • Re: RoHS => tin whiskers?
    ... Spehro Pefhany wrote: ... the network of people you communicate with; ... a jerk neighbor will repeat. ... Best regards, ...
    (sci.electronics.design)
  • Re: Glad this isnt California
    ... >>>California to cause cancer and birth defects or other reproductive ... the power cord manufacturer also makes passive 'scope ... >>>Best regards, ... >>>Spehro Pefhany ...
    (sci.electronics.design)
  • Re: Batteryless Mobile Phone!!!!
    ... >> Best regards, ... >> Spehro Pefhany ... thats what Murrays letter looked like. ... I doubt current laser printers ...
    (sci.electronics.design)
  • Re: Questioning the math Re: reluctance
    ... Spehro Pefhany wrote: ... Best regards, ... you go and piss on everyone elses Christmas. ... design abilities. ...
    (sci.electronics.design)