GARTHWILSON wrote:
It sounds like you didn't de-bounce the switch. An RC followed by a Schmitt-trigger gate will do the job.
Yes, there are various ways to debounce a switch. Garth mentioned an RC followed by a Schmitt-trigger, and BDD's Maxim DS1813 suggestion is also good.
As shown below, several other options become available if the switch is a double pole type (ie, equipped with both Normally-Open and Normally-Closed contacts). These options may make better use of available resources (ie; if your project has leftover gates available).
-- Jeff
_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html