Hi, Savnlik
You just can use :
or ...Code:For I = 1 to 255 PAUSE 50 HPWM 1,I,1000 ' The reason of your loop ( BTW ...). 1000 is pwm freq. NEXT I
Code:DO I = I + 1 .... While I < 255
For limiting Numbers:
AlainCode:I = J MIN 255 ' I is the smaller ( MIN ) number between J and 255 ...
Bookmarks