[PIC] Inverted PWM Output in PIC16F

Status
Not open for further replies.

azhar_multan

Newbie level 3
Joined
Mar 25, 2004
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
58
Hello,
How can I get inverted PWM in 16F73.
I am using CCS C compiler for programming.
Actually I need both inverted and non inverted outputs. So ideal solution for me is to have one module operating in normal mode and the second one in inverted mode.
 

I´m not sure if you can achieve that inverting by hardware.
Anyway, you presumably could try performing by firmware.

According to datasheet:



Duty-cicle is defined as bellow

Code:
PWM Duty Cycle = (CCPR1L:CCP1CON<5:4>) • TOSC • (TMR2 Prescale Value)

I believe that if you subtract entire period form above calculated value, an inverting performed by firmware could be achieved.

Make a try.



+++
 

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…