- Joined Jul 26, 2020
It will be very difficult for me to draw a complete state diagram right now. That's why I will try to make one step at one time. One possible solution for debounce timer routine is setting a timer for 1 ms period and activate timing by loading a countdown variable.
Timer interrupt is set for 1ms and debounce time is 20 ms. When timer interrupt happen we check button is pressed so if button is pressed we decrement count
So when counter will reach at zero. State will change
133.1 KB Views: 3