[PIC] i need Help with PWM in pic16f

Status
Not open for further replies.

dor8

Junior Member level 1
Joined
Mar 24, 2014
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
114
I am using Pic 16f886. The Pic has two outputs CCP1 & CCP2. But according to the data sheet it has 4 PWM outputs P1A, P1B, P1C and P1D. What are the functionality of P1A-P1D? Can they be used for Duty Cycle and frequency (if yes, how)? My circuit has 4 transistors because I need four outputs of PWM. If the P1A-P1D are no good for duty cycle, how to implement the interrrupt.

** i know how to use in CCP1 & CCP2 but i dont know nuting about P1A, P1B, P1C and P1D and how to use in there, i think i can to use in interupt rise/ fault , I connect the port of CCP1 to DIGITAL and becomes the value - the duty cycle is changing - I do BUCK BOOST Converter Enhanced been pushed

The duty cycle is variable, however the frequency is constant. Does anybody have code that shows how to use a variable duty cycle (hi tech C compiler)

Are the routines sqrt and sqr implemented in hi tech C?

thenq you/
 

If you have a look in the datasheet for this microcontroller, in chapter 11, you'll find the the CCP1 is enhanched, and have 4 output, capable to drive a half or full bridge device. The CCP1=P1A, and is the normal PWM output, equal to the CCP2.

To setup the period frequency you need to study the datasheet, ot learn how. You can find the datasheet here **broken link removed**
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…