Hi there,
I'm not skilled in PIC programming.
I wrote a working code for 16f877A using interrupt on timer0 and a counter.
Some days after I want to add WDT. So I used timer 1 to get the counter working and timer0 for the WDT.
Now, even without using WDT the PIC works only after programming. i.e.: If I switch power off and then on again the PIC doesn't work. When I switch power off/on the only way to get the PIC working again is to reprogram it with another code and then again with my code.
I can't understand why this happens.
Anyone can explain, please?
Thankyou,
~V
16f877A not working after power switch
Re: 16f877A not working after power switch
Most probably forgotten to initialise a variable.vince76 wrote:Hi there,
I'm not skilled in PIC programming.
I wrote a working code for 16f877A using interrupt on timer0 and a counter.
Some days after I want to add WDT. So I used timer 1 to get the counter working and timer0 for the WDT.
Now, even without using WDT the PIC works only after programming. i.e.: If I switch power off and then on again the PIC doesn't work. When I switch power off/on the only way to get the PIC working again is to reprogram it with another code and then again with my code.
I can't understand why this happens.
Anyone can explain, please?
Thankyou,
~V
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Re: 16f877A not working after power switch
Rewritten code using TIMER 2.
Now it works.
~V
Now it works.
~V