??? 06/25/06 03:55 Read: times |
#119041 - You are right of course, but... Responding to: ???'s previous message |
Peter said:
Thats not a good idea, since typical, if you read a state the first time it can be noise or bouncing e.g. from a 230V relay, a motor or other loads near the µc.
So the better approach was always to accept a new state if it was equal for at least four sample times. Yes, you are right, of course. The approach of vertical counter is better in terms of noise suppression. But: If you really have a noise problem that is such serious that the logic state of a port line can be altered, then you should solve this by other measures, like shielding and filtering. Peter, it wasn't my intention to offer here the ultimate debouncing scheme, but only to show Arvind and others by the help of a little example, that debouncing of multiple switches can be done by very simple algorithms without endless jumps and conditional branches. Now, when he has understood my ridiculous simple scheme, then he can migrate to the vertical counter methode or even more sophisticated debouncing schemes. Kai |
Topic | Author | Date |
Multiple switch debouncing | 01/01/70 00:00 | |
Otherways | 01/01/70 00:00 | |
Vertical counters | 01/01/70 00:00 | |
vertical conters in C | 01/01/70 00:00 | |
and here | 01/01/70 00:00 | |
vertical counter with press detection | 01/01/70 00:00 | |
debounce and denoise needed | 01/01/70 00:00 | |
You are right of course, but... | 01/01/70 00:00 | |
Reminds me... (off topic) | 01/01/70 00:00 | |
XRL P2,A | 01/01/70 00:00 | |
some hair-splitting | 01/01/70 00:00 | |
exchange | 01/01/70 00:00 | |
thanx Kai ... | 01/01/70 00:00 | |
my way | 01/01/70 00:00 | |
exactly! | 01/01/70 00:00 | |
Spot on. | 01/01/70 00:00 | |
Two samples enough? | 01/01/70 00:00 | |
varies with design | 01/01/70 00:00 | |
Conditional executing versus branching | 01/01/70 00:00 | |
KEY RELEASE SUBROUTINE ... | 01/01/70 00:00 | |
Not really... | 01/01/70 00:00 | |
a TOTAL misconception or -very annoying | 01/01/70 00:00 | |
He does not | 01/01/70 00:00 | |
Beer o'clock | 01/01/70 00:00 | |
Yes, good idea | 01/01/70 00:00 | |
never did, never will | 01/01/70 00:00 | |
Agree![]() | 01/01/70 00:00 |