Let me look through my stuff tomorrow and I'll give you code of mine that I know works.
 I attached a hex file that makes an LED on PORT B3 dim up and then dim down using PWM. I used this the other day, so I think it works. I'll upload it to my chip tomorrow to make sure and confirm with you. But I'm 99% sure it works.