On 3/26/19 1:38 PM, Chris Albertson wrote: > Yes, I know a switch can be de-bounced in software but this introduces > latency as the software has to keep checking the state of the switch. > Reduced latency very much increases the accuracy of the microswitch.
Like Steve Ciarcia said in Byte magazine, circa 1978, my favorite programming language is SOLDER. I usually prefer the hardware solution as the fastest and often most reliable solution. However, rather than increased responsive time when debouncing a switch in software, an intelligent debounce algorithm can greatly reduce the response time. For a home or limit switch, you don't really care when the switch contacts become stable in the new state. What you want to know is the moment the stable condition changes. I'd debounce that limit switch activation by acting on the initial state change and then set a timer to ignore any subsequent bounces. I definitely wouldn't wait for switch contacts to stabilize before acting on the new state. That could be the difference between a machine crashing or not. Of course, hardware can implement the same debounce strategy, but it's easier to wire a bare switch and debounce it in software... even for an old hardware guy like me. _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users