PWM with timer2 in P16F877

Status
Not open for further replies.

david_mora

New Member
hi people, i have a question, i'm trying to covert a simple analog signal into a pwm signal using a PIC 16F877. It means that if the voltage in CH5 (RE0) is 5V, the duty cycle is 100% but if the voltage is 0V the duty cycle is 0%. I used the PWM module but the quentios is this: do i have to disable the CCP1 to chenge the duty cycle (CCPR1L)??
 

No, all you need to do is write to the register, it updates when it next outputs the pulse.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…