• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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)??
 

Nigel Goodwin

Super Moderator
Most Helpful Member
david_mora said:
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.
 

sunil patel

New Member
i think you should use the ic sg3525a , this ic is capabel of working with 8 to 35 v andcan provide you the continuous pwm output.

sunil patel
[email protected]
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top