I have used the tested PWM module from Flowcode and used it to light up an LED with a PIC16F628A, which is quite nice.
This is a simple flow
You can see the video. Ignore the noise as my daughter was curious too
You can see the video. Ignore the noise as my daughter was curious too