At 10:46 PM 2/21/2005, Russell McMahon wrote: >In a real world things change. Murphy brings electrostatic discharge, >power supply glitches, power supply sags, battery spikes, .... . >IF a pin tied high or low changes to an output the processor will >sink/source appropriately. This may not matter at all. And it may cripple >the product. It MAY cause physical damage to the processor. It MAY cause a >battery to flatten far far sooner than it ought. And it may not. Code or >hardware changes may short the open or open the short - the pin's unused >so nobody may notice. I see no problem with leaving unused I/O pins un-connected and set as output. Some have mentioned the supposed problem of the pin floating for the few microseconds at startup until the code gets around to setting the TRIS registers. I fail to see how that is a problem. Others have mentioned the potential problem of an ESD event or other glitch flipping a TRIS bit such that the un-used pin becomes an input. While this might become a problem if it were never dealt with, prudent design suggests that all static registers (set only during initialization) should be refreshed on a periodic basis. After all, if a glitch might turn an unused I/O pin into an input, who is to say that a similar glitch might not change some other register that would actually affect operation? In summary - easiest method of dealing with unused I/O pins is to leave them unconnected and set as output. dwayne -- Dwayne Reid Trinity Electronics Systems Ltd Edmonton, AB, CANADA (780) 489-3199 voice (780) 487-6397 fax Celebrating 20 years of Engineering Innovation (1984 - 2004) .-. .-. .-. .-. .-. .-. .-. .-. .-. .- `-' `-' `-' `-' `-' `-' `-' `-' `-' 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 PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist