We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
hi, i m facing one peculiar problem in timer 1 interrupt in Atmel 89c52. Using interrupt, I am generating a pulse at regular intervals. If I watch the pulses continuously in oscilloscope,sometimes pulse width is varying. Can anyone help me in this regards. I attached the code here. main() { /* Assume proper time settings here */ ---- ---- while(1) { P0=0; overflow_count=0; while(overflow_count <=4000); P0=1; overflow_count=0; while(overflow_count <=4000); } } void timer1 interrupt 3 { overflow_count++; } Assume no syntax error or logical errors in the code. regards, sara