I normally just connect MCLR directly to Vdd. However you must ensure you have a clean, noiseless supply to do this.
I normally just connect MCLR directly to Vdd. However you must ensure you have a clean, noiseless supply to do this.
How clean does it have to be? Ive got a 100uf cap and a 0.1uf cap from VDD to VSS
Cleanliness is down to your design, layout and application. When it's not clean enough, your PIC will soon-enough complain by restarting or by some other delinquent behaviour.
There is no rule that says 100uF and 100nF is the cure for all ills. Most of my designs have only 10uF following the Regulator but augmented with a liberal sprinkling of 100nF's in places where in my judgement they'll do the best good.
Oh. I see. I have actually had trouble with a circuit resetting itself (i have another thread about it). Im sure that is due to interference though as it still resets when running from a battery.
I normally use 10K because a few years ago someone gave me a diagram of how to wire a PIC chip up and ive done it that way since without any problems. I guess its better to know it myself though instead of remembering a diagram
Just becaise a PIC resets doesn't automatically mean a bum Power Supply.
You could have noise induced from other ambient sources - some may not be obvious...
You could have illegal code, missed a RETURN from a GOSUB, forgotten RESUMEs, overspilled stackspace, run off the end of your program, caused a WDT timeout through a negligent loop etc etc etc...
Im 99.9% sure that the code is right. Ive checked it and tested it and its all fine. Im pretty sure its noise. I had a solenoid connected to it through a relay which made it reset everytime the solenoid fired. i put a diode accross the solenoid and that worked. Ive also got it connected to a smoke machine using a relay. I tried using the normal button (circuit not connected) but still it reset itself at the other end of the room. Im testing out a triac on the smoke machine and things seem to be improving.
1 last problem i have is to connect the strobe up to it. I modded my stobe a few years ago so a remote controller could be plugged in. just a simple push to make switch at the end of the wire. For this year i replaced the switch with a relay and again this caused problems. Unfortunately a triac doesnt work on this circuit. Is it safe to connect the mains side of the strobe to a triac?
Oh yeah. If i turn the mains off to the strobe/smoke machine and the 12V to the solenoid then the whole circuit works perfect and all the relays operate properly. Its only affected when there is a load on the switching side of the relays. The solenoid one is next to the chip so i can understand but the other 2 are on the end of a long wire next to the strobe/smoke machine
> Is it safe to connect the mains side of the strobe to a triac?
Most Triacs seem to have mains connected to them... but it all depends on your circuit...
Bookmarks