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 CCS Technical Support

How to Reverse PWM Signal?

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



Joined: 05 Aug 2014
Posts: 7
Location: Turkey

View user's profile Send private message Send e-mail

How to Reverse PWM Signal?
PostPosted: Tue Feb 03, 2015 2:55 am     Reply with quote

Hi All,

I have used PIC18F46K22 with ccs c.

But I really need pwm signals which are reverse each other
I'd like to use this two pwm signals to create AC signal with H-Bridge mosfet.

Could you please help me or could you please give me some advice?

Required pwm signal image;

http://yadi.sk/i/og8B7QyoeS4b6

Best regards,
Mehmet
Ttelmah



Joined: 11 Mar 2010
Posts: 19539

View user's profile Send private message

PostPosted: Tue Feb 03, 2015 3:41 am     Reply with quote

On the ECCP, you can set the active polarity of the output pairs, using CCP_PWM_H_H (or H_L, L_H, or L_L) or'ed into the setup_ccp line. These correspond to the data sheet:
Code:

Full-Bridge ECCP Modules(1):
1100 = PWM mode: PxA, PxC active-high; PxB, PxD active-high
1101 = PWM mode: PxA, PxC active-high; PxB, PxD active-low
1110 = PWM mode: PxA, PxC active-low; PxB, PxD active-high
1111 = PWM mode: PxA, PxC active-low; PxB, PxD active-low

modes.
Only pairs can be changed (so you can't have A high, C low for example).

So sit down and work out which pins have to be high and which low for your combination of drivers and FET's.
guy



Joined: 21 Oct 2005
Posts: 297

View user's profile Send private message Visit poster's website

PostPosted: Tue Feb 03, 2015 10:12 am     Reply with quote

I wonder if on PICs that don't have ECCP you could feed the standard CCP signal into the comparator and use the comparator as an inverter?
asmboy



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

View user's profile Send private message AIM Address

PostPosted: Wed Feb 04, 2015 8:50 am     Reply with quote

A simple inverter will not give you the programmed deadband you need.

If you do what you are thinking - shoot-through will likely result
during transitions when BOTH positive and negative side switches conduct
simultaneously. This glitching -especially with an inductive load
(like a motor?) across the bridge can be quite destructive.
Ttelmah



Joined: 11 Mar 2010
Posts: 19539

View user's profile Send private message

PostPosted: Wed Feb 04, 2015 9:42 am     Reply with quote

Try 'very', rather than 'quite'.....

Twisted Evil
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