Why is this code not working(pwm on a 16f628a)


Results 1 to 9 of 9

Threaded View

  1. #6
    Join Date
    Aug 2008
    Location
    Portugal
    Posts
    240


    Did you find this post helpful? Yes | No

    Default Re: Why is this code not working(pwm on a 16f628a)

    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.
    Last edited by gadelhas; - 3rd May 2012 at 04:24.
    Thanks and Regards;
    Gadelhas

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts