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
Bookmarks