If you vary the value in tmr0 register you can alter the time between
interrupts _________________ Best Regards
Neutone
Joined: 08 Sep 2003 Posts: 839 Location: Houston
Re: set_timer2() Inquiry
Posted: Wed Mar 10, 2004 5:48 pm
chingB wrote:
Hi,
Any one of the community who can provide me with a mathematical calculation for set_timer2().
Say: I have setup_timer_2(T2_DIV_BY_16,100,10)
and I want to set_timer2() to a certain count value ?
Need help on this.
Thank u.
In your example
T2_DIV_BY_16 = 16 instruction cycles to increment the timer
100 = 101 timer increments to overflow
10 = 10 overflows to set the interupt flag
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum