Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 4831

When a mechanical switch closes it's contacts typically do not close "cleanly" and tend to bounce or chatter. This rapidly switching signal could be misread in certain situations so it is usual to attempt to reduce this bouncing to ensure a clean switch detection. the danger is that if the switch is not de-bounced you can detect multiple events from one opening or closing. Can be accomplished using analog circuits or digital circuits.

0 votes

Debouncing buttons

But when you already have a microcontroller you can debounce in software at only the cost of a some code effort. … The essiest way to debounce in software is to check the buttons at moments in time that are further apart than the longest bounce time. 50 ms seems to be an upper bound on the bounce time of 'normal' switches …
Wouter van Ooijen's user avatar
2 votes

Debouncing by ignoring data?

But it can be even simpler: I always debounce by reading the pin(s) at least 50 ms apart. Simple and effective. That does indeed introduce a latency of up to 50 ms. …
Wouter van Ooijen's user avatar
4 votes
Accepted

Capacitor and ISP issue

A simple solution could be to connect the junction of C5 and R1 via a 10k resistor to PB2, and connect the ISP connector directly to PB2. This is a general solution that you can use whenever you want …
Wouter van Ooijen's user avatar
6 votes
Accepted

How is this Pushbutton Debounce code?

I can't put code in a comment, hence an answer. My 'framework' for simple embedded systems is the main loop with polling. To minimize current consumption the main loop can wait let's say 50 ms in idle …
Wouter van Ooijen's user avatar