Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
When I use Timer2, I tend to setup a 10mS period and count 100ths of a second. To do this you set timer2 to prescaler=4, postscaler=10 and pr2=250. This gives a period of 4*250*10=10,000uS = 10mS.
Ok Guys thanks for the replies.
Is the above method good for a clock?
I'm going to use for my clock.
It'll be as accurate as your crystal oscillator.Ok Guys thanks for the replies.
Is the above method good for a clock?
I'm going to use for my clock.
You lose 2 microseconds in each call and return, if you don't take them into account.
You have to fator-in the interrupt handler overhead.
For the program you are suggesting, the handler takes 16 bytes and is executed every 256 cycles.