On Wed, Dec 17, 2008 at 4:10 AM, Forrest W Christian wrote: > Ok, let's back up here.... > > First, let me say that I have spent weeks hunting down a floating pin > problem on a 16f886... and everything which you have been told pin-wise > is 100% accurate. Plus, there are other pins on the '886 that need to > be tied up/down or set differently which aren't immediately obvious. > Or, in other words, setting the tris direction registers to output may > not be enough to actually set everything correctly on an '886. In my > case, I had missed that the LVP fuse was not actually being set. On > another PIC processor, it was some weirdness with one of the "other > functions" on one of the ports which needed to be disabled before I > could set the port to an output. > > Please verify the following: > > That the vdd pin is tied to +5V Done. > That the vss pins (there are two of them) are tied to GND. Done. > That mclr is pulled high through a 47K resistor to VCC. Just need to add the resistor in there, I just put a wire there for now. > That LVP is disabled in fuses, and ideally the LVP pin is pulled low > through a resistor. I don't understand what you mean by "That LVP is disabled in fuses". > That you are using the INTERNAL OSCILLATOR, not an external XTAL or > other clock source (if you are not using the intosc, then there are > other questions as well). Using internal oscillator. > That should cover the basics which should be the same on all > schematics. How you connect the remaining pins really depends on what > you are wanting to do with the PIC. HOWEVER, what people have been > trying to tell you is that your hand-waving is actually enough to change > the value of one or more pins on the PIC since the inputs are so > sensitive to voltage variations. And in some cases, the value is > actually not fully on or fully off, but in-between, which causes all > sorts of weirdness. Yeah, happned to me before when I was fooling around with NAND gat ICs. > The good engineering way to solve this problem is to add 10K resistors > from each of the unused pins to either VCC or GND. This will ensure the > circuit will operate no matter what the settings of the PIC are. This is going to be loads of fun when I get around to my 100 pin PIC32 TQFP chip... > Trust me, and others, when we say that there are *lots* of causes for > this, and there is no way to know what the cause is without trying. > The other option is to go completely through the datasheet and read how > to set *every* pin to a digital output. And there are lots of pins > which the answer is more than setting the tris appropriately. > > -forrest Very helpful! Thanks! Going to try this tomorrow. -- ..::[ solarwind ]::.. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist