Is it powered continuously during that month?the circuit works fine for 1 month but the program misfunctions after that.
No, switching it Off and On doesn't fix it... Its not powered continuously.. May be 12 hours a day. I'm adding the schematic.. Kindly offer your views.Is it powered continuously during that month?
Does switching off and on 'fix' it?
Does the program use non-volatile memory?
reprogramming makes it work again.Does reprogramming it fix the problem, or do you have to replace the chip?
Thanks. Will try.Your direct drive to TR1 is most likely the problem ... you need to buffer it with a transistor to drive the transformer.
Even though you have a diode across TR1, the forward voltage across that diode is 1.1 V .... so your injecting a negative voltage into the substrate of the PIC. The PIC has protection diodes built into the I/O's but not designed for the back emf currents produced by TR1. Over time, this will eventually kill the PIC.
A schottky diode would be better across TR1, but ideally you should buffer the I/O with a transistor.
Or to EEPROM memory?Does your program write to program (flash) memory?
Bob
Have you tried reading the program memory from the pic after it has failed and comparing it with the data that was programmed into it ? It may be worth doing this more than once to see if it is the same locations in program memory that have been changed.
Does any of the code intentionally write to program memory ? It could be some code that is trying to write to EEPROM writing to the wrong address. (Or the The EEPGD control bit set to the wrong state when attempting to write to EEPROM.)
Les.
It's writing to bothOr to EEPROM memory?
So as per post #12, when it stops read flash and EEPROM and look for any errors. It is likely that the problem lies with the code doing that writing.It's writing to both
by Duane Benson
by Robert Keim
by Jake Hertz