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

making pwm in normal io

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



Joined: 20 Jun 2015
Posts: 1

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

making pwm in normal io
PostPosted: Sat Jun 20, 2015 2:35 am     Reply with quote

Hello friends, i am try to making sine wave inverter by pic16f72. Well,
i need four output pwm for h bridge driver.
My question is how to make pwm four normal i/o.
asmboy



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

View user's profile Send private message AIM Address

PostPosted: Sat Jun 20, 2015 7:04 am     Reply with quote

This is not a trivial task you have in front of you.

Because you are talking H-bridge, the task has to include extra hassle things like dead-band on top of handling basic timing .

I'm not sure it can be done safely or well without an awful lot of care and testing. Actually not sure it can be done at all with the part you chose.

What does your schematic for the project look like ???

If you don't know how to proceed, how did you come to be
involved with the task in the first place?

Is this a school assignment by any chance?
temtronic



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

View user's profile Send private message

PostPosted: Sat Jun 20, 2015 7:33 am     Reply with quote

I did H-bridge PWM with the PIC16C84 so it _can_ be done with the '72. That project was a 'napkin challenge', 20 years ago.The load was a bi-directional high powered LED,still functional today.What is unknown at this time is the frequency and resolution required. Two important,basic items that haven't been told. Also what is your load? That's important as well. Also, what else does the PIC need to do?
As asmboy points out not a trivial project BUT given enough specs it can be done, within the limits of the PIC.

The more details you supply, the better we an help.

Jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19451

View user's profile Send private message

PostPosted: Sat Jun 20, 2015 8:23 am     Reply with quote

Save yourself a lot of trouble. Get a faster PIC, with H-Bridge PWM drive....

What you describe is possible. Have a look at the Microchip application notes on things like BLDC control. For a basic PIC like this, they sit in a tight loop, and base the timings on the CCP. Polling this, moving through a state machine to output the required patterns. However you will find that all the ones that have been written in perhaps the last five years or more, instead use something like the PIC18F2431, which really does help to make this easier and (perhaps more importantly _safer_). Having hardware programmable dead-band, and hardware handling of overload conditions (thousands of times faster than code can handle), helps to make the design much easier.

However as Temtronic says the _first_ critical question is speed, and just what else needs to be done by the code at the same time?. If it only has to synthesise the waveforms, and not at too high speed, it is fairly easy even on such an old PIC. Need anything more, and it gets increasingly hard.
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