Re this - as promised, I sent the link to my EE coworker, and here's his response/comments:
If a given pushbutton switch is open, the corresponding input to
the microcontroller is unterminated. A hardcore old-skool analog
hardware EE such as myself would dismiss this as 'poor practice.'
If you make a lot of assumptions about leakage currents in the
microcontroller, ambient RF fields, and condensing humidity, then
this is OK. This circuit world work well enough to get the code
working on the prototype in the air conditioned lab.
Unterminated inputs do not behave as you expect them to behave
if/when the product containing them is subjected to RF
susceptibility testing, as is performed on product bearing
the CE Mark. The product development staff must either avoid
relying on the assumption that unterminated inputs behave in a
predictable way, or write more code and install watchdogs to
recover from whatever havoc occurs from random/multiple/simultaneous
button pushes and/or latched-up inputs on the microcontroller.
If this equipment were to be used in an application where
'failure is not an option' (which is almost any product nowadays)
and if I were involved, then I'd install a weak pull-down
resistor on each of the four bottom lines, say, 100k ohms, to act
as enough of a termination on each input to swamp out leakage
current, while not upsetting the rest of the circuit or causing any
LEDs to begin to glow all the time. A ferrite bead on each of
the five lines to the microcontroller should be all we would need
to get this through approvals testing.
There are some microcontrollers that allow the user to tie an internal
weak pulldown (not pullup) to each input, which would satisfy my
concerns without adding additional pull-down resistors to the
bill of materials.
Hope this helps! |