Re: Timer interrupt in PIC uC
There are many examples if you Goggle for them. You haven't even specified which language and which PIC you are working in.
Basically:
1. create an interrupt routine. this is what gets called when the timer interrupt occurs.
2. load the timer with the value you want - remember it counts UP and creates the interrupt as it rolls over from maximum value to zero.
3. enable the timer interrupt. Also enable the global interrupt bit if necessary.
Now when the timer reaches maximum value and then tries to increment again, it will roll over to zero and the interrupt routine will be called.
Depending on what your assembler/compiler already does, you might need to clear the interrupt bit to make it ready for next time. If you are creating interrupts at fixed intervals you might have to reload the timer value in your interrupt routine.
Brian.