Increse PAUSE 5 to PAUSE 500, it counts perfectly.
Why you have 255 on the second LCDOUT?
Incrementation of Duty variable is done @ line #5, The condition to exit the for-next loop is done @ line #1. If >254, exit the loop. 255>254?Code:1 FOR Duty = 0 TO 254 2 HPWM 1, Duty, 1000 3 lcdout Dec Duty 'First read of "Duty" 4 PAUSE 500 5 NEXT
Bookmarks