??? 07/01/06 04:33 Read: times |
#119503 - debounce scheme. Responding to: ???'s previous message |
Kai Klaas said:
So, when you sample at a rate of 10msec, then 5 samples in a row must show an identical reading, and this reading must be in opposite to the last valid and stored key state (here key released) of course.
Kai So i could do that with these steps., 1)wait for switch press. 2)once switch is pressed, take samples for every 10msec by storing each sample in an inividual register. say R1 to R5 (for 5 samples) 3)Then the sample in R1 should be cheked for equality with R2, R3, R4 (if not equal get back to step 1)and inequality with R5. If the above check clears, then a switch press could be considered.else not. But, the total sampling time would be decided based on the bounce time of the switch. would this leave us in programming again and again depending on the age of the switch? (or) there is any rate of change of bounce time for the switch? Thanks Suresh. |