Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] Inverted PWM Output in PIC16F

Status
Not open for further replies.

azhar_multan

Newbie level 3
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:

pwm.PNG

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

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top