Page 1 of 1

Information Needed on Timer1

Posted: Fri Mar 26, 2010 9:26 am
by keshavamurthy k.c
Hi,

I want to use Timer1 interrupt for every 1 msec.But if we seclect Interrupt component in
that after selecting timer1 interupt and changing in proerties i am not able to get exactly for 1 msec.
Can you please provide how i need to configure register.


Thanks & Regards
Keshav

Re: Information Needed on Timer1

Posted: Fri Mar 26, 2010 11:03 am
by Benj
Hello

You can get different interrupt rates by using the calulator available from here.

http://users.picbasic.org/projects/PicT ... merCal.htm

By changing the timer offset value and the prescaler you should be able to get a whole number or at least a low percentage of error.

The timer offset value will need to be written to the interrupt count registers at the start of your service routine to allow the updated timeout period to be set.

Using a C code icon the code would look similar to this.

tmr1l = 0x12;
tmr1h = 0x01;