Enhanced PWM

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Enhanced PWM

Post by Jan Lichtenbelt »

Please find a very simple example program with enhanced PWM.
Used is a 16F1825 at 19.6...MHz.

The mode is half bridge drive with 2 outputs P2A and P2B, see picture below
half bridge drive.jpg
half bridge drive.jpg (19.06 KiB) Viewed 2878 times
The 2 complementary outputs can be used for half bridge (motor) drive.

Driver rise time can be faster than falling time which will result in short current between V+ and ground. To prevent this the rise pulse must be delayed, see picture below
half bridge delay time.jpg
half bridge delay time.jpg (14.37 KiB) Viewed 2878 times
The practice oscilloscope pictures, see next page.

Refrences:
Pictures from: http://www.microchip.com/stellent/idcpl ... e=en546902
Attachments
Test_Enhanced_PWM_16F1825.fcf
(8.5 KiB) Downloaded 321 times

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Re: Enhanced PWM

Post by Jan Lichtenbelt »

Please find some oscilloscope pictures:
1. Both PWM's above each other
1. Both PWM's above each other
P2A and P2B above each other.jpg (75.08 KiB) Viewed 2877 times
2. Both PWM's at the same level
2. Both PWM's at the same level
P2A and P2B at same level.jpg (75.97 KiB) Viewed 2877 times
Attachments
3. The sum of both PWM, which clearly shows a dead time of 0.8 usec, as programmed in the Flowcode
3. The sum of both PWM, which clearly shows a dead time of 0.8 usec, as programmed in the Flowcode
0.8 usec PWM delay.jpg (78.52 KiB) Viewed 2877 times

Post Reply