Here is a good example of a switch debouncing circuit using a Schmitt Trigger. The relays are used to mimic real switch bounce (switches in EC are perfect and have no bounce). Use the switch at the top and watch how the circuit gives a nice, clean output , despite the noise from the switch!