Generating pwm with ECCP (Ehnanced capture/compare/pwm

Submitted by yusuf on Sat, 08/22/2020 - 05:51

hello i am currently working on generating pwm with ECCP mode where my P1A and P1D switch at the same time also P1B and P1C also switch at the same time 

the switching of P1A and P1D will always be reciprocal to that of P1B and P1C

which while P1A and P1D are on, P1B and P1C will be off and vice versal 

in a nutshell am using that to generate a sinewave 

 

 

so my question is that, is there any way i can configure the EECP to make P1A and P1C totally off

 

while P1B and P1D will be switching together as pwm?

Can you provide a part  number of the IC which you are using 

  Joined December 02, 2019      117
Monday at 10:02 PM

Pic16f886

  Joined August 22, 2020      3
Saturday at 04:52 AM

Could you please provide the information of which mcu unit you are using?

  Joined February 12, 2018      696
Monday at 02:11 PM

Pic16f886

  Joined August 22, 2020      3
Saturday at 04:52 AM

In the datsheet, page number 126. The CCP1CON register could be configured in such way.

See the image below for the configuration. -

 

Capture.JPG

Change the CCP1M as per your need

  Joined February 12, 2018      696
Monday at 02:11 PM