Hi,
I decided to modify the circuitry to make the reset more obvious. I removed 100Om MCLR series resistor. The resistor was put there to comply with “Microchip MCLR use warning”(see attachment).
I’ve also gathered more information:
PIC resets only if you use MCLR pin as an input. If you move the sense wire to any other pin (and change the code accordingly) there is no problem no matter how hard you try.
If you remove capacitors than everything works fine. I attached MCLR voltage traces(Reset-NoReset).
One 0.1uF capacitor (we use two make reset more frequent) is crucial for it filters the input line. 0.1uF capacitor ensures that there will be no false triggering.
It looks like the decision is not to use MCLR as an input. But then we face unexpected reset problem. PIC will reset randomly when you are close to the interference source (ignition systems, welding, heavy contactors and many more) which is no good if you design hart pace makers.
One solution is to place 5v TVS (RS p.n. 1017823) to earth right at the MCLR pin. If you place it at the button-capacitor unit(in my case it is 5 inches away) there will be no effect and PIC will reset. I attached the scope trace(TVS NoReset). Unfortunately I can’t see from the scope traces how TVS prevents PIC reset or why PIC resets in the first place. I think without such understanding no reliable projects can be built. I’ll carry on my research and post any results.
Bookmarks