Generating pwm with ECCP (Ehnanced capture/compare/pwm

Submitted by yusuf on

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?

Debashis Das

  Joined December 02, 2019      117

Monday at 10:02 PM

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

y

yusuf

In reply to by Debashis Das

  Joined August 22, 2020      3

Saturday at 04:52 AM

Pic16f886

Sourav Gupta

  Joined February 12, 2018      696

Monday at 02:11 PM

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

y

yusuf

In reply to by Sourav Gupta

  Joined August 22, 2020      3

Saturday at 04:52 AM

Pic16f886

Sourav Gupta

In reply to by yusuf

  Joined February 12, 2018      696

Monday at 02:11 PM

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