I am using pic16f877a and set timer 1 ,I need to know each increment
in timer 1 what will be equal in us, please help me.
I am using pcm v4.024
#use delay(clock=4000000)
setup_timer_1(T1_INTERNAL | T1_DIV_BY_4);
rnielsen
Joined: 23 Sep 2003 Posts: 852 Location: Utah
Posted: Fri Mar 16, 2007 8:49 am
Well, the way to figure this is take the main oscillator (Fosc) divide that by 4 (a hardware division), divide that by 4 (since you have that configured in your setup_timer_1() statement) and then divide that by 65536 (which equals the 16 bit register that counts the clocks) and you will have the frequency of Timer1's interrupt.
Fosc/4/4/65536.
You will get 3.8146972 interrupts each second which equals to be aproximately 262mS between each interrupt.
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