sinusoidal PWM


Closed Thread
Results 1 to 40 of 84

Thread: sinusoidal PWM

Hybrid View

  1. #1
    Join Date
    Feb 2011
    Posts
    37


    Did you find this post helpful? Yes | No

    Default Re: sinusoidal PWM

    Thanks for the tip....yup,it's it working well now....
    i'm reading the pic16f877 data sheet page 63 about how to change the duty cycle of th pwm,it says the duty cycle is specified by writing to CCPR1L:CCPCON<5:4>. So in our case does this code below specify the duty cycle?if not where the duty cycle of pwm has been specified in the program?i want to know so that i may modify the duty cycle to make it equal to 90%.
    code:
    Code:
    sine:
        TMR1L = timerone.byte0
        TMR1H = timerone.byte1     
        CCPR1L = sineval[STEPCOUNT]>>1 
        stepcount = stepcount -1
        if stepcount = 0 then stepcount = 72
    Last edited by Ioannis; - 8th May 2011 at 15:36.

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