There are two ways of producing a PWM signal.
1) The way that you are doing it, getting the code to count cycles and deciding when to raise the output and when to lower it.
2) Using the CAPTURE/COMPARE/PWM (CCP) MODULE
With that you just set it up and it will produce a fixed PWM signal until you change something.
CCPR1L is the register that sets the duty cycle in the CAPTURE/COMPARE/PWM (CCP) MODULE. It basically does the same as the "dutyReload" register in your code. PR1 does what "Cperiod" does in your code.
When I suggested the top half of CCPR1L, I thought that you were using the CAPTURE/COMPARE/PWM (CCP) MODULE. If PR1 is 0, timer 2 rolls round every 256 clock cycles, so to get 16 steps of duty cycle, you need to go up by 256/16 = 16 in CCPR1L for each step.
Code:
Step CCPR1L
0 00000000
1 00010000
2 00100000
3 00110000
4 01000000
5 01010000
-
-
14 11100000
15 11110000
That is what I meant by the top half of CCPR1L. You can use the swap command to get data there.
Back to your code, it seems to work on the simulator. The output frequency is 4 kHz with the internal oscillator.
The only problem that I can see is that the timing isn't consistent when the pushbuttons are checked, so one cycle every 63 ms is a bit longer than it should be.
Also, clearing the temp register after you use it is totally unnecessary.
How are you checking the duty cycle? The stopwatch showed the code getting to
bsf portAcopy, pb.pwm
every 251 cycles and it gets to
bcf portAcopy, pb.pwm
(16 * dutyReload) cycles later.
That looks to me like it is working.