From: "Mark Hanchey" >I have a pic project that uses relays on several pins, none of the pins > are programming pins. The problem I having is that anytime I program the > chip, 18F46K80 , the relays switch on and off rapidly, this causes a lot > of power spiking in the outputs connected and also doesn't do the relay > life span any good either. Anyone faced this problem before ? I thought > maybe raising the resistor value on the transistors driving the relays > might work but wanted to get some input first. > > Are there pins on the pic that are less susceptible to having their > inputs change while being programmed ? Currently it sounds like the > relay is switching about 5 or 6 times during programming. Whenever the PIC is in reset (which occurs during programming) the pins=20 become inputs. If they are connected to a FET then the gate of the FET wil= l=20 float and possibly turn on the FET. You should connect a (relatively high=20 resistance) resistor between the PIC pin and ground to keep the FET turned= =20 off during reset. If your transistors are bipolar this shouldn't be needed because a bipolar= =20 transistor needs a gate current to turn on. In that case I have no clue wha= t=20 your problem could be. -- Bob Ammerman RAm Systems --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .