my old proteus can't sim that chip but a 16f1825 is ok

done like this the "remainder" is time between pulses in uS provided overflow is < 2