- This topic has 2 replies, 3 voices, and was last updated 10 years, 3 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
|
Microcontroller › AVR › timer running slow
sir,
sir i have configure the timer correctly but my timer running slow nearly at 4 mhz. i have used 16 mhz crystal..i have written proper fuse bits to work with 16 mhz crystal (C9FF).I have given prescaler to 1024. but i can’t understand the problem..
my code is like…
// digital clock using timer–
Hi,
You have included the lcd functions inside the ISR. These functions take more time than the timer firing period, and you will miss a lot of timer interrupts when these functions are executing inside the ISR.
The solution is to keep the lcd functions in the main code.
ISR should be as short as possible so as to service next ISR.
possible solution just update values in ISR dont display