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, =A0The reason is that > MCLR is responsive to 3 different voltage levels: Gnd, 5V, Vpp. =A0If > MCLR is just floating, it is possible that an external static field > can drive MCLR well above 5V and into the Vpp territory. =A0The PIC > will do decidedly strange things when that happens - most often, it > will attempt to go into programming mode. =A0But 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. =A0If it is just floating, tie a 10K > resistor between MCLR and Vdd. =A0You may now find that your problems > have vanished. > > dwayne > > > -- > Dwayne Reid =A0 > Trinity Electronics Systems Ltd =A0 =A0Edmonton, AB, CANADA > (780) 489-3199 voice =A0 =A0 =A0 =A0 =A0(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