Actually the any argument about TRIS changing somehow (due to a bug) makes it clear that there is no one solution that fits all cases when your talking about bidirectional I/O. Because what if you have an input to the pic that cannot tolerate a pull-up/pull down resistor. Without the assumption that the software is without bugs that will alter TRIS there is no solution, simply because the pins are I/O pins For instance it is a bad idea for me to put pull-up/down resistors on an analog input. It effects the analog value. But a software bug could cause that pin to be a digital input which might be somewhere indeterminate because of the device giving the signal and cause a problem. Also the pin could *ACCIDENTALLY* become an output in which case I might damage the device the analog input is connected to. On Wed, 26 May 1999, Benjamin Petersen wrote: > > Just as an aside, with the talk about what one should do with > > unused IO > > pins. The consensus seemed to be that that the TRIS register may > > accidently, or otherwise, change state during operation and therefore > > the pins should be set and left as unconnected outputs. > > > > What if the TRIS state somehow changes to an input? Floating > > inputs can > > cause a bit of havoc as well. Maybe they should be set as > > outputs with a > > high value pullup/pulldown on them as well just to be on the > > safe side. > > Unused pins ? Not in my project ! > > I'd say that you could put a C demo version and a JAL (FULL) version and so > on on your CD. > > Regards > Benjamin Petersen >