If the switch just results in turning of and off a LED used as an
indicator, there is no need to debounce it. Debounce becomes
important if the fact that the switch turns on and off many times
within a millisecond or so after it is actuated disturbs the
operation of your circuit. Something like a counter that counts
how many times the switch is operated would need debounce.
Simply turning on and off the led to follow the switch movement
does not.
Likewise, dipswitches used to set modes often do not require
debouncing. They can either be accepted as is, or in many cases
are read at one particular instant during some initialization, so
debounce is not needed. Only if the operation of the switch
causes an immediate action is the debounce needed.
Jim Lewis wrote:
--
--Ray Andraka, P.E.
President, the Andraka Consulting Group, Inc.
401/884-7930 Fax 401/884-7950
email (e-mail address removed)
http://www.andraka.com
"They that give up essential liberty to obtain a little
temporary safety deserve neither liberty nor safety."
-Benjamin Franklin,
1759