Quote Originally Posted by gadelhas View Post
Try this code insted

Code:
STARTMAIN:
if button=0 then   
 For Duty=0 to 255       
  PWM LED4,Duty,Cycle   
 Next   
 high led4    
 pause 1000 
   
 For Duty=255 to 0 Step -1       
  PWM LED4,Duty,Cycle    
 Next
endif

low led4
GOTO STARTMAIN
If you read the PBP Manual you will see that the PWM command after execution turn the pin input.
thanks, so high and low still work when the pin is a input, interesting.