Mark Hanchey wrote 2012-02-12 14:57: > On 2/11/2012 10:33 AM, M.L. wrote: >> On Sat, Feb 11, 2012 at 10:12 AM, Mark Hanchey = wrote: >> >>> 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. >>> >>> Thanks >>> Mark >> Mark are the PIC output pins pulled low? >> When you program the PIC the pins are floating so they could randomly >> go high and switch your relays. >> Or if the relays are attached to the PGC or PGD lines then you need to >> do something differently. > > The circuit I am using is just a simple 10k resistor connected to a > 2n3904 connected to a relay with a diode across the relay coil pins. I > hadn't thought about the need to pull the pins low with another resistor > since it wasn't needed to make the circuit functional but will give that > a try . The relays are not connected to any of the pins needed for > programming . My code doesn't switch any relays until about a minute > into the code and that requires user interaction to happen too. > OK, a *bipolar* transistor (not MOS). That should normaly not be a problem, it should not drive the relays other then when the PIC is *active* driving the pins "high". That has to be done throught the code. Weird... Jan-Erik. > > Thanks > Mark > --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .