Moses McKnight wrote: > Unless I pull the pin low before I change it to an input the > line stays high. Never design anything like that. > - I guess due to the board traces and maybe the switch > acting as a capacitor and storing a charge. Or, in other words, "undefined", which is the last thing you want, right ? :-) > What did you mean by open inputs? A pin tied to > nothing and set as an input? Yes! Never, ever do that ! The pin will pick up electromagnetic "noice" from the environment and act as a 50 (or 60) Hz generator and create all sorts of non-wanted effects. So, *never* leave an CMOS input pin un-connected. This is true for *any* CMOS circuit, not only PICs and not only microcontrollers. Well, besides those IC where the data sheet clearly says that there are internal pull up/down restors, of course. But that's a special case... Jan-Erik. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist