Try replacing the transistor with a LED and a 470 ohm resistor to make sure it is not something to do with the transistor or relay.
Is the cap across power rails large enough for BOR fuse. Rule of thumb, LED with resistor across power rails should go dim not instant off when power is cut.
What have you done with MCLR?
Dave
Always wear safety glasses while programming.
Dave,
1. I have replaced the transistor and relay, but made no difference. I will try the resistor and LED you suggested.
2. I have a 330uF cap between the output of the regulator and Gnd.
3. MCLR pin is connected to +5 via a 4.7K series resistor, and a 0.1uF cap to gnd.
Thanks
One more thing if the other does not get it. Tie all un-used pins to ground with a 10k or so. If there is "noise" could have something to do with it. Good to do this on finished projects.
Dave
Always wear safety glasses while programming.
Bookmarks