View previous topic :: View next topic |
Author |
Message |
mvliege
Joined: 05 Aug 2014 Posts: 7 Location: Turkey
|
How to Reverse PWM Signal? |
Posted: Tue Feb 03, 2015 2:55 am |
|
|
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
|
|
Posted: Tue Feb 03, 2015 3:41 am |
|
|
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
|
|
Posted: Tue Feb 03, 2015 10:12 am |
|
|
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
|
|
Posted: Wed Feb 04, 2015 8:50 am |
|
|
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
|
|
Posted: Wed Feb 04, 2015 9:42 am |
|
|
Try 'very', rather than 'quite'.....
|
|
|
|