Question about HPWM on a 28X1

Period is a variable/constant (0-255) which sets the PWM period
(period is the length of 1 on/off cycle i.e. the total mark:space time).
Does the 0-255 number represent milliseconds?

- Duty is a variable/constant (0-1023) which sets the PWM duty cycle.
(duty cycle is the mark or ‘on time’ )
What does this number represent?
Percent of the period?


I am trying to gradually increase the brightness of an LED and at the end jump to full brightness. Will this code work?
Code:
hpwm 0,0,%0001,100,100 ' start pwm
For Dty=100 to 700 Step 50
let pinsc=%00000000
pause 250  ' pause .25 s
let pinsc=%00001100
hpwmduty Dty ' set pwm duty
Next Dty
pause 100 ' pause .1 s
hpwmduty 1023 ' set pwm duty

pause 100 ' pause .1 s
hpwm off
let dirsc = %11111110
	goto Main:
 
Top