When a mechanical switch opens or closes (for example, when user depresses a pushbutton), it is very typical that the mechanical apparatus used to “close” or “make” the circuit bounces for a short time. That is, contact is made initially between the switch contacts, but then due to mechanical elasticity, imperfections in manufacturing, and other factors, contact is then broken for short period, then remade, then broken again, etc., for some amount of time. This “switch bounce” phenomenon is typically very short lived, with each make-break cycle happening over a few microseconds, and with perhaps one to several such cycles per switch actuation. Smaller switches might exhibit bounce activity for 10-100us, while large switches might bounce for upwards of 1ms.
Design a circuit that can debounce a mechanical switch. Your circuit should receive the clock, data, and reset inputs, and produce a single debounced output. Your circuit should be reusable in other digital systems, but for this system, you can assume a switch bounce time of no more than 200us (so choose an appropriate clock). Note this problem is related to homework problem #1.