I am trying to write a program for my aquarium to control a 'sunrise' effect for high power LED lights. I am good with the driver side of the circuit but need a little help with the pic pwm signal.

I have read about the HPWM function in PBP, but don't really understand how to set up the configuration. I have a 16F887 (with 4 channels) and want to use something like...

DutyCycle var byte
TRISD= $00000000 ' for P1B output pin, or TRISC if P1A

For DutyCycle=0 to 255
HPWM 1,DutyCycle,1250
Pause 15000
DutyCycle=DutyCycle+1
Next

End

Will this produce a gradual increase in perceived brightness up to the max after around an hour, then maintain the max output until power is turned off ?

Are all declarations made ?

Is it possible to use a different output channel, ie. P1B instead of P1A, how would this be coded ?

Thanks.