for the frequency limitation i guess it's an assembler maths limitation. it's hard to fit millions or 1/milions in a 16bit maths routine and/or in a Word size variable

Look in your datahseet to know how to calculate the PR2 value and search for HPWM in PBPPIC14.LIB file to know how the calc are done.

I'm be concerned about some statements used in a code example that you early write in another post.
What do you want to know?