View previous topic :: View next topic |
Author |
Message |
luckyluke
Joined: 18 Apr 2006 Posts: 45
|
MCLR_FROM_RUN |
Posted: Fri Mar 23, 2018 3:27 pm |
|
|
hello
I am working on a robot controller card which have main 18f2520 and 12f629.
Because of robot unfit chassis in some certain maneuvers robot make drifts and this cause 18f2520 have reset MCLR_FROM_RUN (12f629 never resets).
So what exactly MCLR_FROM_RUN is and how can i suppress it ?
Thanks |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
luckyluke
Joined: 18 Apr 2006 Posts: 45
|
|
Posted: Wed Mar 28, 2018 8:52 am |
|
|
Is there any difference about placing the 100nf or is it best to solder directly to power pins? |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9245 Location: Greensville,Ontario
|
|
Posted: Wed Mar 28, 2018 9:51 am |
|
|
OK, I'm 'old school' but I'd never,ever put components UNDER a PIC or other device as shown in your "B" or right side version.
Murphy's Law of Black Smoke says that component , under the PIC WILL fail.
Jay |
|
|
luckyluke
Joined: 18 Apr 2006 Posts: 45
|
|
Posted: Wed Mar 28, 2018 10:01 am |
|
|
OK
beside your point what i want to ask is electrically which one is correct
B regulator --> bypass cap --> power pins
A regulator --> power pins --> bypass cap
is there any difference?
edit note: A and B corrected according to the image
Last edited by luckyluke on Wed Mar 28, 2018 11:49 am; edited 1 time in total |
|
|
Josep Robert
Joined: 27 Mar 2018 Posts: 25
|
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9245 Location: Greensville,Ontario
|
|
Posted: Wed Mar 28, 2018 11:14 am |
|
|
Yes, though how significant depends upon a lot of things.
A does allow 'bad' energy to enter the PIC.
B allows the capacitor to absorb the 'bad' energy BEFORE it enters the PIC.
So B would be the better choice.
Usually the manufacturer of the devices will show suggested PCB layouts for bypass caps as well as xtal/cap configurations.
What is also important is in using the correct TYPE and value for the capacitor(s). Again, the mfr will inform you of the type/value, sometimes even telling you a specific device to use.
Just noticed, when I mean B, I refer to the drawing NOT your 2nd post.
So in your text power pins-cap-PIC (a).
Jay |
|
|
RF_Developer
Joined: 07 Feb 2011 Posts: 839
|
|
Posted: Thu Mar 29, 2018 5:07 am |
|
|
temtronic wrote: | A does allow 'bad' energy to enter the PIC.
B allows the capacitor to absorb the 'bad' energy BEFORE it enters the PIC. |
That's the old way of thinking about it. These days its generally much more a matter of EMI than EMC, in other words of preventing the 'bad' energy FROM the PIC affecting other things. I'm still plumping for B, however.
At PIC speeds, which by the standards of much of today's digital circuitry is almost glacial, it doesn't make much difference. I have to use both in the layouts of my circuits (I don't layout PCBs myself, I have to give it to someone else who does it with my guidance only for tricky stuff) and have, touch wood, never yet had a problem. Bear in mind my PICs often go in RF amplifers operating at up to 8GHz, where spurious signals, e.g. PIC/digital/PSU switching noise would cause big problems.
The choice of capacitor is generally much more of a concern. I also ensure we use meatier tracks than normal for all power traces, and there is nearly always a buried ground plane and generally a power plane as well with significant inter-plane capacitance acting as distributed decoupling. Such a layout, with SMT parts cannot avoid vias however, and often the decoupling cap ends up on the other side of the PCB to the PIC, but that tends to give shorter traces to the PIC pins - it is a matter of practicality trumping theoretical perfection. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9245 Location: Greensville,Ontario
|
|
Posted: Thu Mar 29, 2018 5:47 am |
|
|
re: That's the old way of thinking about it. Yeah, well I get to collect the guv pension 2 months from now when I turn 65, so , OK...I'm old.....
When I designed Optical Emission Spectrometer Data Acqusition PCBs the ground planes were a 'checkerboard' of traces not a 'flooded' or solid copper. Never had a problem with RF doing that.
I do like 'fat' traces whenever possible,then again I was a 'tape and donut' guy..that was 1/2 a lifetime ago, sigh....
Putting parts under PICs just ain't 'right' to me though.....
Jay
|
|
|
RF_Developer
Joined: 07 Feb 2011 Posts: 839
|
|
Posted: Thu Mar 29, 2018 6:39 am |
|
|
temtronic wrote: |
Putting parts under PICs just ain't 'right' to me though.....
|
I'm "only" in my mid to late fifties... With DIP/DIL I totally agree. putting parts under them is often not great. WIth SMD however, well, that's half the point: parts only require one side of a PCB and therefore the other is also available for parts. Well, a few in most cases as its still advisable for production reasons to put most parts on one side, but things like decoupling caps can easily go on the "back" of the board.
Personally, I've not dealt with DIL devices at all in the last twenty years, everything I've done is SMT. I am not a hobbist anymore, going totally pro decades ago. I do other things, like photography (animals, especially big cats, are my main thing) for fun. I used to do historic reenactment but recently I've got into restoring pre-1960 GPO telephones such as this, my very rare type 82 fro 1920: https://www.flickr.com/photos/94731913@N03/40181975314/ For them, my main tool is often a box spanner. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19549
|
|
Posted: Thu Mar 29, 2018 12:04 pm |
|
|
I've been forwards, then back, then forwards again.
Did projects more than 30 years ago, which were all surface mount, padless via's, but were still being drawn with tape and pads. There was a new PCB package at the time called 'Vutrax', but it had limited board size capabilities.
Then had to start designing for stuff that could be field serviced, so switched back to using a lot of through-hole parts.
Then because fewer and fewer parts are available in through-hole, the sheer packing density possible with SMD, and costs have become so low that the engineers can carry complete boards, so went back to SMD again...
Now on the examples being posted, the big thing is to make the power tracks thicker. If power planes can't be used, thicker tracks, and critically (not shown), where they go back to, and how they route relative to other tracks carrying power. The routes could also be straightened with smoother corners. |
|
|
luckyluke
Joined: 18 Apr 2006 Posts: 45
|
|
Posted: Mon Apr 02, 2018 5:34 am |
|
|
Thanks for opinions.
In case of somebody have same problem i have solved it with a diode between Vpp and 5V.
I was making hobby circuits with lcd,l ed and some sensors. It was easy work with them.
Problem started after i used some motors. I made a lot of development on pcb design with the great help of Ttelmah.
I added power planes, tvs, zener, inductor then i add LC filter, two battery. I even tried with LF series pic in order to avoid brownout. I doubled drivers, solder 1000uf direct to power pins, 100 nf to power pins but resetting was always there.
No matter what i did, resetting problem always came back. When there was nothing to change, i changed my point of view.
My first idea was pic not resetting. It was going in programming mode and with no incoming data, program start from begin.
it sounds ridiculous to me but trying a diode to icsp pins was very easy compared to other changes.
i connect a diode Vpp--->|---5v and it was fantastic!! solved the problem immediately. In my case fast diodes shows better results. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19549
|
|
Posted: Mon Apr 02, 2018 6:10 am |
|
|
That implies you are getting RF pickup on the Vpp pin. Question what circuit you have on the pin?. Obviously a diode won't work if you ave any form of reset circuit. If it wasn't connected, then 'asking for trouble'...
Glad you have found a solution. |
|
|
luckyluke
Joined: 18 Apr 2006 Posts: 45
|
|
Posted: Mon Apr 02, 2018 6:26 am |
|
|
There was only a 10K pullup resistor on MCLR now there are diode and 10K. |
|
|
gaugeguy
Joined: 05 Apr 2011 Posts: 303
|
|
Posted: Mon Apr 02, 2018 7:09 am |
|
|
If the MCLR pin has an extended trace to a programming header then a small capacitance of 100pF or so can be placed to ground along with the 10k pullup to Vcc. This will aid in the rejection of noise that could cause an unintended reset and still allow proper programming. |
|
|
|