Timer with LCD
Posted: Mon Apr 18, 2011 4:24 pm
Hello,
I am trying to make an accurate timer with tenths of seconds. I am using TMR2 to produce a 50hz interrupt, and using a count to 10 in the interrupt to increment the tenths of seconds. I need to display the time on an LCD.
I have a flag variable in the interrupt that tells the main program to update the LCD. My question is, how can I update the LCD without disabling TMR2 before and after? Disabling the interrupt causes the timer to loose accuracy.
Thank you
I am trying to make an accurate timer with tenths of seconds. I am using TMR2 to produce a 50hz interrupt, and using a count to 10 in the interrupt to increment the tenths of seconds. I need to display the time on an LCD.
I have a flag variable in the interrupt that tells the main program to update the LCD. My question is, how can I update the LCD without disabling TMR2 before and after? Disabling the interrupt causes the timer to loose accuracy.
Thank you