Hello Unregistered ,
Originally Posted by Acetronics Hi, Savnlik You just can use : Code: For I = 1 to 255 PAUSE 50 HPWM 1,I,1000 ' The reason of your loop ( BTW ...). 1000 is pwm freq. NEXT I or ... Code: DO I = I + 1 .... While I < 255 For limiting Numbers: Code: I = J MIN 255 ' I is the smaller ( MIN ) number between J and 255 ... Alain I change the duty manually with two buton's (up and down)
For I = 1 to 255 PAUSE 50 HPWM 1,I,1000 ' The reason of your loop ( BTW ...). 1000 is pwm freq. NEXT I
DO I = I + 1 .... While I < 255
I = J MIN 255 ' I is the smaller ( MIN ) number between J and 255 ...
http://www.lesvoselectronic.com http://www.lesvoselectronics.com
I had test and not work.Because next have count 255 + 1 = 256 Ouch, yes of course... my mistake, sorry.
Originally Posted by HenrikOlsson Ouch, yes of course... my mistake, sorry. No problem. aratti code solve my problem.
Forum Rules
Bookmarks