Don't remember if this is well documented in the manual. The PWM is 10 bit in this family. set_pwmx_duty(0) only clears the MSB of the duty register. The lower two bits could still be hi. Check yo ...
I am trying to fade LEDs connected to a PIC16F1827 on and off based on a time read from a RTC chip (MCP79410). But at the moment, I am having an issue with 0% PWM not turning the LED off (it gets fair ...