If you run a pic16 series micro at 4mhz, the instuction per second are 1,000,000 (million) 1 / frequency = duration so.. 1/1,000,000 = 1uS...
If you want your binary switch to select 1khz -> 16khz, your time periods will be 1mS -> 62.5uS (BUT there will be two time periods high and low)
so we need to trip the timer at 500us and 32 (you'll have to drop the 0.25 and round up), so 500uS and 31uS Timer0's smallest count (1:2) multiples of 2
So pre-load TMR0 with -16 (239) for a frequency of 16khz and -250 (5) for 1khz.
So a 16 entry lookup table with the timer re-load values
REMEMBER to adjust for size of ISR (interrupt service routine) can be about 15 clock cycles..