http://www.beyond-circuits.com/wordpress/tutorial/tutorial10/
I got some debounce information as fololow
P0 | P1 | ||
HEX | DEC (clock period) | HEX | DEC (clock period) |
000045 | 69 | 000005 | 5 |
005024 | 20516 | 002A63 | 10851 |
000755 | 1877 | 00282A | 1028 |
000049 | 73 | 003DCF | 1582 |
00001F | 31 | 0025D6 | 9686 |
0006DC | 1756 | 000C61 | 3169 |
P0(max) = 20516 clock = 0.2ms
P1(max) = 10851 clock = 0.1ms
My thought:
- 10(ms) is a good choice because P0 and P1 likely is much smaller than 10(ms), or the probability of P0, or P1 > 10(ms) is almost zero. In addition I can push the button as fast a 1 push/1sec >> 10(ms). Conclusion 10(ms) is too safe, I think 2(ms) is OK!
- I don’t know: Does the button bounce more often when it is pressed or released?