Since a byte can count up to 255 max when you add 1 to 255 the byte overflow and start from zero again (it cannot be 256).If pwr >= 255 always go to 0 and no to 255.Why happen this?
If you want to keep your variable pwr at 255 then you can skip the add command, or you must use a word variable.
Code:pwr var byte If up = 1 Then PAUSE 50 If pwr = 255 Then Skip00 pwr = pwr + 1 Skip00: Endif
Al.
Bookmarks