ericgibbs Well-Known Member Most Helpful Member Aug 23, 2012 #21 ese2709 said: i think we will discuss this one later.... i will try run some timer code and understand how it working.... Click to expand... I guess you know that Timer1 will not be able to count directly upto 5 Seconds. At 1uSec clock, its a 16bit counter [ 65536 decimal] so thats 0.065536 seconds] , if you used the 1:8 prescaler that becomes 0.524288 Seconds. So what you need to do, is use the Timer1 interrupt , set say at 0.5secs [ or close] and count 10 of these interrupts...OK?
ese2709 said: i think we will discuss this one later.... i will try run some timer code and understand how it working.... Click to expand... I guess you know that Timer1 will not be able to count directly upto 5 Seconds. At 1uSec clock, its a 16bit counter [ 65536 decimal] so thats 0.065536 seconds] , if you used the 1:8 prescaler that becomes 0.524288 Seconds. So what you need to do, is use the Timer1 interrupt , set say at 0.5secs [ or close] and count 10 of these interrupts...OK?