piclist 2001\01\14\175023a >
Thread: grounding unused inputs
face BY : Dan Michaels email (remove spam text)

Olin Lathrop wrote:
>> To be "safe", it is best to tie unused input pins to ground [or Vcc,
>> doesn't much matter which] *ONLY* through a resistor, rather than
>> directly with a short. This is not superstition, as during code
>> development it is all too easy to accidentally configure a pin
>> intended as input to output. You then run the risk of
>> short-circuiting an output.
>Perhaps in a low volume product.  I wouldn't want to burden a high volume
>product with unnecessary parts for a minor debugging convenience.

Even in a high volume product, personally I would never simply
(a) configure a pin as output and then leave it unterminated, or
(b) set a pin to input and then short straight it to gnd. There are
a number of possible "disastrous" scenarios this way:

1 - with (a), an ESD spike might modify the TRIS register, set an
   output pin to input, and then it would float and pick up noise,
   and possibly affect proper operation.

2 - with (b), an ESD spike might modify the TRIS resgister, set an
   input pin to output, and fry your product.

3 - with (b), on the next go round with code development, you might
   do the TRIS thing yourself by mistake.

4 - with (b), it takes more work if you want to use the pin
   differently in the future.

5 - other circumstances may accidentally mod the TRIS register in
   the field, eg brownouts, lightning crashes, screwy things related
   to general susceptibility of the /MCLR pin, who knows what.

Better to spend a few pennies and tie the unused pins to gnd via
a bussed SIP resistor net, and improve the reliability of your
product. Also, as mentioned several times, it helps saves the butt
of those of us in the subset of non-perfect coders when they screw
up during development. Good practice for code dev, good practice
for field reliability.

In a nice "guaranteed" noise-free field environment, you might be
ok doing it the "quick-and-dirty" way. But, all in all, better
safe than sorry. Experience, yes. Superstition, no.

- danM

http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


See also: www.piclist.com/techref/microchip/ios.htm?key=input
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) grounding unused inputs

month overview.

new search...