Go search for OLYMPIC TIMER in this forum for an example of TMR1 and PICBASIC Interrupts. The text describes how it all works.