This tutorial is about debouncing button's in software. The final described method isn't really invented by me as it ends up to be about the same as Peter Dannegger's (avr freak user danni) excellent debounce code. I start with a simple method usable for one button and try to describe the steps needed to generalize it to a solution that only uses logic operations, which have the benefit that you can debounce up to a whole port of buttons at about the same cost as the one button method. Recommended reading before you jump into this is Ganssle's text about debouncing and Bit manipulation (AKA "Programming 101") in this forum. Edit: Some small corrections and added the zip-file that was lost in the migration to the new forum.
Level: Posting Freak
Joined: Thu. Jan 8, 2009
Posts: 1940 View posts
Location: Lund, Sweden
Last Edited: Thu. Feb 5, 2015 - 08:43 AM