Quote Originally Posted by mister_e
is that your whole code?

If so, there's few things missing about the interrupt declaration and handling (Disable, Enable, On interupt goto,...,.. )

i can't explain why it should longer to load one WORD value or Another. so it's certainely something elsewhere in the whole program.
Thanks Mister_e for your reply,
1. I'm only showing part of the code, not all of it.
2. I'm not concerned about obtaining a frequency lower than it should be, I'm rather concerned about the gaps in frequency when changing by 1 the value I load into TMR1...
3. While the program is waiting for the interrupt it is only executing a while ...wend loop checking for two digital inputs, that's all. I presume the interrupt doesn't take that much in this case (no PAUSE instructions nor LCDOUT...)
4. When I add the ticks until interrupt routine executes the output frequency seems to be more unstable!!!!

suggestions are welcome, thanks a lot.