Alternatively you could add the following line
FOR Duty = 0 TO 255
HPWM 1, Duty, 1000
LCDOUT $FE, 2, DEC Duty 'First read of Duty
NEXT
Duty = Duty-1
LCDOUT $FE, $C0, DEC Duty 'Second read of Duty
Which would put it back the the final value inside the For/Next loop
If you are also dimming down then do the opposite
FOR Duty = 255 TO 0 STEP -1
HPWM 1, Duty, 1000
LCDOUT $FE, 2, DEC Duty 'First read of Duty
NEXT
Duty = Duty+1
LCDOUT $FE, $C0, DEC Duty 'Second read of Duty
Keith
www.diyha.co.uk
www.kat5.tv
Bookmarks