Hi Jan,
OK, that makes sense. Yes, the PWM circuitry in the PIC can only go so low. Using a lower oscillator frequency will also change the lower limit of the PWM frequency, at 4MHz you'd be able to get down to 245Hz - even lower if you also change PIC to a 16F1xxx device - but it will never go to zero.

I don't know of any "frequency subtractor circuit" and if one exists you might as well use the V/F converter chip and I don't think generating a frequency with the CCP module, feed it back into the PIC and trip an interrupt on it is the way to go. You can equally well use the timer to internally generate an interrupt. However, generating interrupts at tens of kHz might be stretching it. Another issue is that you require 50% dutycycle, this means that for 10kHz output frequency you're going to have to generate interrupts at 20kHz. However, the G320X accepts "Active" pulses of as Little as 1us so I don't see the reason for the 50% dutycycle?

Finally, while the PIC is servicing the interrupt it won't count any pulses. The COUNT command sits in a software loop monitoring the the input and counts the transistions it sees. When the PIC is servicing the interrupt it can't count pulses. You'd be better off counting them with hardware counters but then you need yet another timer as the timebase interrupt....

In either case it's going to be tricky to get the dynamic range you need. You're going to have to use different methods depending on "where" on the speed curve you're at.

Is 15kHz the desired max frequency?
Does it have to go to all the way to 0Hz? Can you live with 10, 20, 50Hz?
The schematic shows the 16F84A, is that the one you're using? Can you move to another one?

Sorry, no solutions, only questions....

/Henrik.