CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Help! Inverted PWM in 16F73

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
azhar_multan



Joined: 24 Aug 2012
Posts: 1
Location: Lahore

View user's profile Send private message

Help! Inverted PWM in 16F73
PostPosted: Sat Mar 08, 2014 8:53 pm     Reply with quote

Hello,
Is it possible to get inverted PWM in 16F73 ? 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.

Regards
Ttelmah



Joined: 11 Mar 2010
Posts: 19368

View user's profile Send private message

PostPosted: Sun Mar 09, 2014 1:07 am     Reply with quote

Read the data sheet.
No.

To have inverted outputs available requires a chip with a more sophisticated module like the ECCP. Why on earth use such an old chip though?. It is not flagged as obsolete yet, but cannot be far from being so. In general newer chips offer extra features like the ECCP, and are cheaper as well.
temtronic



Joined: 01 Jul 2010
Posts: 9174
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun Mar 09, 2014 5:47 am     Reply with quote

As MR. T points old, 'ancient' PIC.....however if you're stuck using it, simply add an inverter to the PWM output pin.
Depending on the overall speed of the project, you probably will not notice any effect of the small propagation delay of the inverter.
Another option, again if a small delay is OK, is to select another I/O pin and invert it's output based upon the PWM signal.This also could work for you , though there will be a greater delay due to the program reading,deciding, setting I/O bits.
For low frequency PWM(<20KHz) or non critical loads( lights,audio) either method will work.
I do suggest that you use a new PIC though as Mr. T. says, if possible!

hth
jay
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Sun Mar 09, 2014 4:18 pm     Reply with quote

Quote:

both inverted and non inverted outputs


but be aware that if you stick with antique parts
that the inverter approach suggested,
can make "shoot-through" trouble at higher frequencies,
especially if you are using the two signals to drive a synchronous
buck converter or similar totem-pole mosfet pair,
due to asymmetric switch time delays,
quite possible in the LOAD side of your circuit.

Not knowing the frequency or your circuit- i
can't comment further.

using a more suitable PIC is the real answer here.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group