devonsc
Advanced Member level 4
Hi there,
I'm a newbie in using PIC microcontroller and would like to ask something regarding the duty cycle of a PWM coding.
If its not too much trouble, can anyone briefly explain how do I determine the duty cycle of a PWM duty cycle in the coding? Is it true that 255 (decimal) is equivalent to 100% duty cycle while 0 (decimal) is equivalent to 0% duty cycle? If this is right, does it mean that I should write:
movlw d'127'
for a duty cycle of 50%? Advice needed..Please? Thanks in advance..
I'm a newbie in using PIC microcontroller and would like to ask something regarding the duty cycle of a PWM coding.
If its not too much trouble, can anyone briefly explain how do I determine the duty cycle of a PWM duty cycle in the coding? Is it true that 255 (decimal) is equivalent to 100% duty cycle while 0 (decimal) is equivalent to 0% duty cycle? If this is right, does it mean that I should write:
movlw d'127'
for a duty cycle of 50%? Advice needed..Please? Thanks in advance..