Lab HJ06-08 Switch-Bounce Filter, Version A S215 081006
OEES 215
20 points
![]() |
Write a program based on the flowchart. Explanation Sometimes inputs (such as those from switches) do not change cleanly from 0 to 1 or 1 to 0. As shown in the timing diagram below, in0 goes up and down a couple of times before finally staying high. It also goes up and down a couple of times before staying low. If in0 is coming from a switch, we would say that there is a switch-bounce problem. When you look at a fine-enough time scale, all switches have a certain amount of bounce. ![]() When Delay is high in the above diagram, the delay is running. The above diagram shows one way of handling switch bounce. Here's what's happening in the diagram:
|