Very good thoughts. I appreciate it. Quintin Beukes On Wed, Sep 23, 2009 at 10:12 PM, Barry Gershenfeld wr= ote: >> Further, we eventually didn't ground the PINs because Francois also >> said that it's "bad". Though we found shorting them against each other >> only also prevented the PIC from rebooting due to static. >> > > > Reading this thread brought several things to mind. =A0They are not > necessarily aimed at your problem, but can be generally applied. > > > If connecting the pins together without grounding them remedies the probl= em, > that suggests that at least one of them is an input, and that at least one > of them is an output. =A0In effect, it ties the inputs to whatever logic = level > the output pin is. =A0 It also demonstrates that an "approach of static" = (a > high impedance phenomenon) would not affect an output pin (or any pin > connected to it). > > If one of the pins is found to be an input, then that's kind of a lesson > worth considering when approaching the notion of connecting unused pins to > ground. =A0They say, "Be sure you don't try to drive them high". =A0And w= e say, > "I'm careful not to." =A0And then something like this happens, causing us= to > reconsider just how sure about that we are :) > > TRIS is not the end-all in pin programming either. =A0I had a situation o= nce > where port D was behaving extremely strangely. =A0It turned out the paral= lel > port feature had been enabled, which meant some other pin (on port E) was > controlling its ability to be an input. =A0I looked at the chip in questi= on > here, and I see that some of port B can be an A/D channel. =A0There's a > register to make it not do that, and it has to be set when you start. > Things like that. > > And then the overall lesson. =A0=93When you eliminate the impossible, wha= tever > remains--however improbable--must be the truth.=94 =A0Paraphrasing that, = it says > that once you know nothing in your circuit could be wrong, you are left w= ith > the task of proving it. =A0That's why putting a TRIS instruction in your = code > almost certainly sets the port up, but only "almost". =A0You would still = need > to show that it actually compiled into your code, that it is actually loa= ded > (and gets executed!) on the chip, that it had the intended effect, and th= at > nothing else fiddled with the port later. =A0(And maybe another thing I > haven't thought of!) > > Barry > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist