If it's a problem of static field (and not an output which in real life is input ) then probably you should check if thre is any ground plane below the PIC belly which is left floated and not connected to GND (if there is any). I had once this problem, but with a SMD package. I hope your prototype is on a proffesional PCB before running in the field... Vasile On 9/23/09, Quintin Beukes wrote: > That was actually what we tried RIGHT before finding the solution. > Doing the 10k resistor between VDD and MCLR didn't help for being > reset by static fields. And when only the PORTB output pins are > grounded, then it takes the problem away. > > Quintin Beukes > > > > On Wed, Sep 23, 2009 at 6:10 PM, Dwayne Reid wrote: > > At 11:32 AM 9/22/2009, Quintin Beukes wrote: > > > >>Maybe it's not connected to an LED. I'm not sure. Though I know that > >>it is configured as either an INPUT/OUTPUT. > > > > I've just read your most recent message, where you say that MCLR is > > used as a programming pin. > > > > I guess my question would be: is there a pull-up or pull-down > > resistor on that pin? > > > > The reason that is important is this: even if MCLR is configured as > > an input, it can still have an effect on the PIC, The reason is that > > MCLR is responsive to 3 different voltage levels: Gnd, 5V, Vpp. If > > MCLR is just floating, it is possible that an external static field > > can drive MCLR well above 5V and into the Vpp territory. The PIC > > will do decidedly strange things when that happens - most often, it > > will attempt to go into programming mode. But the effect is > > different with different PIC families. > > > > My suggestion, for what its worth, would be to examine the PCB and > > see what is connected to MCLR. If it is just floating, tie a 10K > > resistor between MCLR and Vdd. You may now find that your problems > > have vanished. > > > > dwayne > > > > > > -- > > Dwayne Reid > > Trinity Electronics Systems Ltd Edmonton, AB, CANADA > > (780) 489-3199 voice (780) 487-6397 fax > > www.trinity-electronics.com > > Custom Electronics Design and Manufacturing > > > > -- > > 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 > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist