Then you ARE using the correct peripheral module. I just don't undersand why you think you need (or even WANT) to have the PWM period in the seconds range. The PWM frequency needs to be at least 20-25Hz or you WILL see that the LED is actually blinking.
If you want to slow down the time it takes to fade up/down it is not the PWM frequency you need changing, it's how often you update the dutycycle. Just insert a PAUSE 10 in your FOR-NEXT loop and the fade will take 2.5 seconds.
But again, managing the (E)CCP module "manually" is better for this. There are plenty of examples around for that but by all means, go ahead with HPWM to get started, its drawbacks may not affect you.
/Henrik.
Bookmarks