Anyone interested here is a tool in Excel to calculate the PR2 register and the CCP register value.

If any of these two values are greater than 255 and 1023, the cell turns yellow with red bold font.

As usual, remove .txt from the file name to make it open with Excel.

Ioannis

PWM Calculations.xlsx.txt