I think I’ve already written VHDL code to debounce switches, but I can’t find it at the moment, so I’ve just written new debouncing code for the FPGA-Elf. The system clock is divided down to produce a debounce clock of around 1 KHz. Each debouncer takes as input that clock and a raw switch input, and produced a debounced output. The debouncer has a one-bit current state, and a four-bit counter. Whenever the raw input matches the current state, the counter is reset to zero. When it doesn’t match, the count is incremented, and if the count hits a maximum, the state is toggled.
Meta
Archives
Categories
Blogroll
- Armed and Dangerous
- Bill the Lizard
- boingboing
- Cato Unbound
- Craphound
- Curious Creature
- Dan Gillmor
- Dave Barry
- David Byrne
- Decrepit Old Fool
- Defective By Design
- Digital Cuttlefish
- Doc Searls
- Don Marti
- Factory Automation Software Blog
- Fark
- Freakonomics
- Freedom to Tinker
- Good Morning Silicon Valley
- Groklaw
- Hanford Lemoore
- Homeland Stupidity
- Leibson’s Law
- Monday Evening
- Neil Gaiman
- Rudy Rucker
- Russ Nelson
- Schneier on Security
- Science Comedian
- Slashdot
- The Volokh Conspiracy
- This Mind Intentionally Left Blank
- Tin “Man” Le
- Wil Wheaton
- xkcd