??? 11/06/06 15:21 Read: times |
#127441 - like this Responding to: ???'s previous message |
Please suggest me code in C for switch debouncing
What does C, Pascal, Fortran, Cobol or assembler have to do with it? Start a timer interrupting every 10ms (or whatever your switches require). Do the reading of the switches in the ISR and if two readings are identical, you have a debounced reading. elementary my dear Watson Erik PS DO NOT IN ANY WAY try to do a timing loop in C. |
Topic | Author | Date |
Switch Debounce in C | 01/01/70 00:00 | |
Can you generate a delay? | 01/01/70 00:00 | |
like this | 01/01/70 00:00 | |
ad nauseam | 01/01/70 00:00 | |
You should know better by now! | 01/01/70 00:00 | |
Jack Ganssle in Embedded Systems | 01/01/70 00:00 | |
also remember | 01/01/70 00:00 | |
an oft forgotten fact | 01/01/70 00:00 | |
emergency switch should act directly... | 01/01/70 00:00 | |
not life and limb | 01/01/70 00:00 | |
debounce always ! | 01/01/70 00:00 | |
If you get spurious keypresses, you have problems | 01/01/70 00:00 | |
one of the tons of examples: | 01/01/70 00:00 | |
hardly nonsense | 01/01/70 00:00 | |
totally different things !![]() | 01/01/70 00:00 |