cancel
Showing results for 
Search instead for 
Did you mean: 

Hello, I am making a program for triac dimmer,here timer4 is used for rc5 decoding,and timer1 for triac control, Problem is,when I download the code to the mcu,timer1 interrupt works for few minutes,but seddenly it stops,seems timer is not running, plea

Chayan Roy
Associate III
Posted on February 25, 2017 at 16:09

I am using STM8S003F3P6 controller.

2 REPLIES 2
Posted on February 25, 2017 at 16:21

Please edit this so you have a title and a complete question rather than stuffing the question in the title.

Review the circuit and scope in non-live operation.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Chayan Roy
Associate III
Posted on February 25, 2017 at 18:08

Hello, Clive,extremely  sorry for my mistake,and   thanks for your suggestion. I think I have found the cause of my problem, it may be the  EMC issue. Actually My controller is  losing timer1 interrupt . I have checked the program with battery power supply, when ever any external  disturbance occurs  timer loses interrupt. I am thinking of using watch-dog solve this problem,but don't know how to place the watch-dog code. Please,suggest me if you have any solution. I have to do it in software,I can't change change the hardware,as the cost and the space is not allowing me to do that.