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(); }
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...
Dear Abdul Hameed, The problem persist when i ignored the function inside the ISR.
if you want qualified advise, present your code in a legible way (formatted, indented, commented ) that you have checked for legibility in the preview
Erik
Look at the instructions: www.danlhenry.com/.../keil_code.png
Use Bold and Italic for emphasis - there is no point in making your entire post Bold!
Use the 'pre' tags for Source Code (and similar) only!
Also note the link to Tips for Posting Messages: http://www.keil.com/forum/tips.asp
View all questions in Keil forum