Re: More questions


David
 

Hmm, could this be a switch bounce situation? Bounce - when the switch has a mechanical oscillation against the contact, like two pieces of metal banging together and the pushing away, then coming back, and pushing away until the bang energy diminishes and the metal stays in contact. In the old days, in the dark times when 300 baud ruled the land, when we put a switch on a digital i/o line we either had to write code that would sense if the switch was triggered, then set a look again flag but not take action, look at the switch again in say 100 or 200ms, and if it was still triggered take action. Alternatively we sometimes put in a single shot multi-vibrator for momentary or a flip-flop if not, which held the switch state once triggered. Then if the switch had bounce after first contact it would have no effect on the microprocessor as the first trigger was locked. 

Anyway, just some odd old neurons firing off.

73 

Join BITX20@groups.io to automatically receive all group messages.