piclist 2001\01\15\155730a >
Thread: grounding unused inputs
www.piclist.com/techref/microchip/ios.htm?key=input
flavicon
face BY : David VanHorn email (remove spam text)



>
>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 listservspamspamBeGonemitvma.mit.edu with SET PICList DIGEST in the body


<4.3.2.7.2.20010115154948.00c6b400@mail.cedar.net>

In reply to: <4.3.2.7.2.20010115124015.00a94bb0@pop.telusplanet.net>
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...