Guest pkstone Posted March 4, 2003 Report Share Posted March 4, 2003 Please pardon the ignorance of a newbie, but why isn't debouncing required for buttons connected to DIN modules? I would think that latching the a button value while its contacts were still bouncing would lead to errors. What am I missing?Phil Quote Link to comment Share on other sites More sharing options...
Guest Flownezz Posted March 4, 2003 Report Share Posted March 4, 2003 Someone correct me if i'm wrong, but i think that the debouncing is taken care of in the code - this is a much quicker alternative to hardware debouncing and alot more versatile (different buttons bounce for varying degrees of time - so any hardware approach would end up being based on the worst case scenario thereby increasing latency and decreasing performance) - hope that helps :) ;D Quote Link to comment Share on other sites More sharing options...
TK. Posted March 5, 2003 Report Share Posted March 5, 2003 Yes, the software takes care about debouncing. But the impementation was very easy: since the button input registers are sampled every 1 mS, temporal transitions are filtered "automatically".Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Guest pkstone Posted March 5, 2003 Report Share Posted March 5, 2003 Yes, the software takes care about debouncing. But the impementation was very easy: since the button input registers are sampled every 1 mS, temporal transitions are filtered "automatically". (Thorsten) So if you happen to sample in the middle of a "temporal transition", the software has some kind of state machine that ignores anything that's not steady (perhaps it must last for more than one 1ms sample?)It's great to know that this is taken care of! (Throws away 74LS367 buffer for debounce circuit) :)Thanks, Thorsten.Phil Quote Link to comment Share on other sites More sharing options...
TK. Posted March 5, 2003 Report Share Posted March 5, 2003 Hi Phil,this "unknown" state isn't relevant for the common use due to mechanical reasons. Since you are not able to press and depress a button within one millisecond, it doesn't matter if a transition is recorded one mS sooner or later... and a button is normaly in a stable state again within one mS. Additional debouncing measures are only necessary if a digital device reacts on a transition immediately (i.E, if an interrupt is triggered by an external pin).Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.