PIC 18F4431 PWM Problem
not sure but it might have something to do with your ptper value.  for example when i calculate your resolution which is ln(Fosc/Fpwm)/ln2 i get 8.64 bits.  I believe you want this to be an integer, such as 8 or 10 bits.  So if you backsolve to get the correct pwm frequency, you can then get a proper ptper value.  once again, not sure if this is the issue, but it might be..