Hi,

Iam trying to sort out a 'minor' problem. Iam using a 16F819 with internal oscillator running. I have two relays connected via NPN transistors. The relays are fed from 12volts. The transistors are just basic switching transistors.
The problem is as follows, unit powers up, goes through a brief self test (Flashes 3 leds! a few times), then proceeds to power one of the relays, this works fine. I am using a selector switch connected to other pins to choose one of three options. What iam finding is that quite often the PIC locks up after the relay is powered, it doesnt always happen but it is more often than not. The selector switch ceases to provide the correct output on the LEDs.
I have noticed one thing, that is if I independently power the circuit it works flawlessly. It is only when I use the onboard transformer that the trouble starts. It has ample amounts of current available. The circuit draws 105mA, the transformer is capable of 192mA. I have added additional smoothing capacitors etc and that only seems to make matters worse.

Any suggestions?

Cheers

Darryl