Hardware Reference
In-Depth Information
Switch debouncing
As mentioned earlier, the simple circuit of Figure 9.1 is unsuitable for use when
the state of the switch is regularly changing. The reason for this is that the
switching action of most switches is far from 'clean' (i.e. the switch contacts
make and break several times whenever the switch is operated). This may not be
a problem when the state of a switch remains static during program execution
but it can give rise to serious problems when dealing with, for example, an
operator switch bank or keypad.
The contact 'bounce' that occurs when a switch is operated results in rapid
making and breaking of the switch until it settles into its new state. Figure 9.3
Figure 9.2 Interfacing a DIL switch input to a digital input port
Photo 9.7 Various switches and contacts
Search WWH ::




Custom Search