|
"I was tought NEVER to connect an interrupt directly to a mechanical switch since that may lead into troubles caused by bouncing."
I too have heard that before, and in general I use firmware to debounce.
But then if you examine what our peers have told us, re no mech sw to an interrupt, implication
is ISR rate potentially too high, you run up against the facts, mechanical that is, and contact inertia
causing relatively low rates. All the scope captures I have ever seen put those rates in the 10's of
uS to 10's of mS rates. In a 1 MIPs processor that was probably an issue. The other problem is if mech
sw input is used as clock or as data failing to meet Ts and Th times, but edge triggered ISRs pretty much
take care of that.
So in short I think the idea was born out of level triggered ISRs, slow cpu's, and a little fllooby dust thrown in.
That being said I think most of us still use firmware to handle.
Regards, Dana.

|