Start with PWM duty set to 0 and ramp it to 100. Use the object called PWMASM, it has a set duty method. Create a loop that repeats, increment the Duty by 1 each repeat. Use waitcnt to determine how fast it gets from 0 - 100.
PUB RampLed
x := 0
Repeat 100
pwm.setduty(x) 'set pwm as pwmasm object
waitcnt(40_000_000 + cnt)
x++
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Where am I? Where am I going? Why am I in a handbasket?"
http://docs.google.com/Doc?id=dhts4crd_8g5tkgcc8