This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problem with Timer0 Interrupt

Hi all, I am using Timer0 as interrupt for display time on LCD. But when the interrupt occurs, it won't come back to the last executed command of interrupted. It is repeating the ISR. I am using embedded C. I don't know what is happening. I did my best. Please help me.

here is my ISR

void timer0() interrupt 1
{ TH0 = 0xFC; TL0 = 0x17; time_display(); }

Parents
  • 
    Hi Saan,
    
    Where r u selecting the timer mode & why r u loading TH0 & TLO in ISR itself?
    And its better that avoid the function calling in ISR,
    instead of this better maintain flag in ISR and perform the operation in main function.
    
    Ensure that u r not using ur Timer0 any where else.
    
    Post the complete code for better answer...
    
    
    

Reply
  • 
    Hi Saan,
    
    Where r u selecting the timer mode & why r u loading TH0 & TLO in ISR itself?
    And its better that avoid the function calling in ISR,
    instead of this better maintain flag in ISR and perform the operation in main function.
    
    Ensure that u r not using ur Timer0 any where else.
    
    Post the complete code for better answer...
    
    
    

Children