Searching \ for '[PIC]: grounding unused inputs' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=input
Search entire site for: 'grounding unused inputs'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: grounding unused inputs'
2001\01\14@074732 by Jose S. Samonte Jr.

picon face
Do unused inputs really need to be connected to ground?
What is the effect if they are not grounded?
Does it affect operation of the PIC?
Thank you very much.

____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

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


2001\01\14@090241 by mike

flavicon
face
On Sun, 14 Jan 2001 05:46:58 MST, you wrote:

>Do unused inputs really need to be connected to ground?
>What is the effect if they are not grounded?
>Does it affect operation of the PIC?
>Thank you very much.
>
>____________________________________________________________________
>Get free email and a permanent address at http://www.netaddress.com/?N=1
Unused pins should be connected to either 0V or Vdd, or set as
outputs. For PORT B you could also enable pull-ups as an alternative
if this doen't cause problems with other pin usage. If left unconnected,  they may float to intermediate voltages and
cause increased (and erratic) power consumption and  noise.
For a breadboard lash-up it usually doesn't really matter, but any
production circuit should avoid floating inputs.

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


2001\01\14@111508 by Olin Lathrop

face picon face
>>
Do unused inputs really need to be connected to ground?
What is the effect if they are not grounded?
Does it affect operation of the PIC?
<<

This has been beaten to death several times.  Check the archive.

I leave unused pins open and set them as outputs.  I usually tie unused
input-only pins to ground.


*****************************************************************
Olin Lathrop, embedded systems consultant in Devens Massachusetts
(978) 772-3129, spam_OUTolinTakeThisOuTspamembedinc.com, http://www.embedinc.com

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


2001\01\14@124041 by David VanHorn

flavicon
face
At 05:46 AM 1/14/01 -0700, Jose S. Samonte Jr. wrote:
>Do unused inputs really need to be connected to ground?
>What is the effect if they are not grounded?
>Does it affect operation of the PIC?
>Thank you very much.

They don't have to be inputs on the pic, make them outputs, and let them float.

If you leave them as inputs, then yes, they should be connected to a logic
level, either high or low will do. Ground is probably slightly better for EMI.
--
Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9

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


2001\01\14@125936 by Dan Michaels

flavicon
face
Olin Lathrop wrote:
>>>
>Do unused inputs really need to be connected to ground?
>What is the effect if they are not grounded?
>Does it affect operation of the PIC?
><<
>
>This has been beaten to death several times.  Check the archive.
>
>I leave unused pins open and set them as outputs.  I usually tie unused
>input-only pins to ground.
>

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.

Furthermore, having a resistor on the pin, rather than a short,
makes it much easier to utilize that pin later on for some useful
function, as the need may arise.

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


2001\01\14@152445 by Olin Lathrop

face picon face
> 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.


*****************************************************************
Olin Lathrop, embedded systems consultant in Devens Massachusetts
(978) 772-3129, .....olinKILLspamspam@spam@embedinc.com, http://www.embedinc.com

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


2001\01\14@175023 by Dan Michaels

flavicon
face
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.


2001\01\15@151904 by Dwayne Reid

flavicon
face
At 05:50 PM 1/14/01 -0500, Dan Michaels wrote:

>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.

Hi there, Dan.

I would agree with your reasoning above *if* I set the TRIS registers only
at the start of code and never touched them again.  But I consider that to
be bad practice.  I refresh all important registers regularly, usually in
the routine that looks after the watchdog timer.  In fact, I will often
*read* the registers to make sure that it is what I expect them to be,
rather than just refreshing them.  If I get a nasty transient that is
enough to disturb the TRIS or INTCON registers, I figure that I had better
re-init everything anyways.  So: I configure un-used pins as output and set
them LO.

Regarding being able to use some of those un-used pins for later changes,
you are correct in that having pads with holes makes those changes easier
to make.  But you don't need to stuff components in those holes.

dwayne



Dwayne Reid   <dwaynerspamKILLspamplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(780) 489-3199 voice          (780) 487-6397 fax

Celebrating 17 years of Engineering Innovation (1984 - 2001)

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Do NOT send unsolicited commercial email to this email address.
This message neither grants consent to receive unsolicited
commercial email nor is intended to solicit commercial email.

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspamspam.....mitvma.mit.edu with SET PICList DIGEST in the body


2001\01\15@155730 by David VanHorn

flavicon
face
>
>I would agree with your reasoning above *if* I set the TRIS registers only
>at the start of code and never touched them again.  But I consider that to
>be bad practice.  I refresh all important registers regularly, usually in
>the routine that looks after the watchdog timer.  In fact, I will often
>*read* the registers to make sure that it is what I expect them to be,
>rather than just refreshing them.  If I get a nasty transient that is
>enough to disturb the TRIS or INTCON registers, I figure that I had better
>re-init everything anyways.  So: I configure un-used pins as output and set
>them LO.


Interesting.
I see what you mean here.
On the AVR or Z8, this isn't a problem because the tris-equivalent
registers can't be modified by inputs like this.  I can easily output a 1
into a short to ground (pointless but harmless) and the chip won't decide
to change it on me.

I think the PIC architecture puts a larger burden on you to protect the
processor from output forcing in your designs.

It's an interesting design wrinkle though, that your output bits could be
changed on you at any time. That, plus the weaknesses in the BSF/BCF
instructions wrt pin loading, argue twoard the shadow register approach for
the port registers.

--
Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email EraseMElistservspam_OUTspamTakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body


2001\01\15@192135 by Dan Michaels

flavicon
face
Dwayne Reid wrote:

>I would agree with your reasoning above *if* I set the TRIS registers only
>at the start of code and never touched them again.  But I consider that to
>be bad practice.  I refresh all important registers regularly, usually in
>the routine that looks after the watchdog timer.


Also a good idea - back when I worked with 6805, Motorola actually
recommended in their databooks to periodically refresh the TRIS
registers [whatever they called them], just in case they are
changed by ESD/noise/etc. This should be easy to do in the outermost
code loop, since the TRIS are usually set on bootup and rarely changed,
in most cases.

- danM

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspamspam_OUTmitvma.mit.edu with SET PICList DIGEST in the body


2001\01\15@194035 by Dwayne Reid

flavicon
face
At 03:55 PM 1/15/01 -0500, David VanHorn wrote:

>Interesting.
>I see what you mean here.
>On the AVR or Z8, this isn't a problem because the tris-equivalent
>registers can't be modified by inputs like this.

Hi there, Dave.

Something you wrote puzzles me - maybe there is yet another PIC wrinkle
that I am not aware of.  Is there any condition where the TRIS register can
be changed by something happening on the port pins?  If so, this is a new
problem to me!

The only port related problem I can think of right now is the
read-modify-write issue - its not a problem since I am aware of it.  But I
am not aware of a TRIS register susceptibility.  Is there a problem
there?  What causes it and what does it do?

I always check or refresh TRIS and other important registers simply because
I can't predict what a nasty ESD or EMI event might do to me - all I can do
is deal with the problem if it happens.  But it sure doesn't happen during
normal operation.

dwayne




Dwayne Reid   <@spam@dwaynerKILLspamspamplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(780) 489-3199 voice          (780) 487-6397 fax

Celebrating 17 years of Engineering Innovation (1984 - 2001)

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Do NOT send unsolicited commercial email to this email address.
This message neither grants consent to receive unsolicited
commercial email nor is intended to solicit commercial email.

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email KILLspamlistservKILLspamspammitvma.mit.edu with SET PICList DIGEST in the body


2001\01\15@214016 by David VanHorn

flavicon
face
At 05:10 PM 1/15/01 -0700, Dwayne Reid wrote:
>At 03:55 PM 1/15/01 -0500, David VanHorn wrote:
>
>>Interesting.
>>I see what you mean here.
>>On the AVR or Z8, this isn't a problem because the tris-equivalent
>>registers can't be modified by inputs like this.
>
>Hi there, Dave.
>
>Something you wrote puzzles me - maybe there is yet another PIC wrinkle
>that I am not aware of.  Is there any condition where the TRIS register can
>be changed by something happening on the port pins?  If so, this is a new
>problem to me!

Sorry, I meant port not tris :)

--
Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservTakeThisOuTspammitvma.mit.edu with SET PICList DIGEST in the body


2001\01\16@014433 by yansong gu

flavicon
face
Has anyone used a dragonball for palm alike development?  I just received
some literature from big M.  Wonder where is a good start from a picer's
point.

Yansong


{Original Message removed}

2001\01\21@222546 by Richard Sloan

flavicon
face
Does not seem to matter if an unused output is fried.

-----Original Message-----
From: pic microcontroller discussion list
[spamBeGonePICLISTspamBeGonespamMITVMA.MIT.EDU]On Behalf Of Olin Lathrop
Sent: Sunday, January 14, 2001 3:19 PM
To: TakeThisOuTPICLISTEraseMEspamspam_OUTMITVMA.MIT.EDU
Subject: Re: [PIC]: grounding unused inputs


> 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.


*****************************************************************
Olin Lathrop, embedded systems consultant in Devens Massachusetts
(978) 772-3129, RemoveMEolinspamTakeThisOuTembedinc.com, http://www.embedinc.com

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

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestEraseMEspam.....mitvma.mit.edu


2001\01\22@041944 by Russell McMahon

picon face
>Does not seem to matter if an unused output is fried.

There is a fate WORSE than a cleanly fried output waiting for an in service
device that accidentally flips a grounded unused input to a high and unused
output (or whatever).

This is MUCH higher current drain. I have had a PIC in a micropower
application suddenly draw 100 mA from a  3 volt supply ! :-)
That was from gross inattention (ie stupidity) (5 x inputs connected to VCC
driven as grounded outputs) but it could happen in real life.



     Russell McMahon
_____________________________

What can one man* do?
Donate food daily free !!! -  http://www.thehungersite.com/
Donate Vitamin A!  http://www.thechildsurvivalsite.com/
http://www.rawa.com  - one perspective on Afghanistan
http://www.changingourworld.com    http://www.easttimor.com   http://www.sudan.com

(* - or woman, child or internet enabled intelligent entity :-))


>> 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.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...