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

PWM

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



Joined: 04 Aug 2005
Posts: 9

View user's profile Send private message

PWM
PostPosted: Wed Feb 06, 2013 8:29 am     Reply with quote

Hi,

I have been using one PWM in some projects, but I'd like to add one more with a different frequency.

As I understand from the datasheets, many of the MCU have more than one PWM.

I haven't succeeded in using more than one PWM.

Is it possible to use more than one PWM independently


Thanks
Ttelmah



Joined: 11 Mar 2010
Posts: 19513

View user's profile Send private message

PostPosted: Wed Feb 06, 2013 9:15 am     Reply with quote

You have to be very careful when searching. For example, chips with the full bridge PWM module, will have four PWM pins, but only one actual 'channel'.

For 90% of the chips, with two PWM's, the PWM's both use the same oscillator, so can give you two signals at the same frequency, but with different pulse widths. Similarly the power control module supports three different channels, but only one oscillator source.

If you must have separate frequencies, you need to be looking at one of the later chips with multiple PWM clock sources. For example the PIC18FxJ50, has two ECCP modules, which can be set to use Timer2 and Timer4 respectively. This then allows different frequencies on the two PWM's.

Why do you need different frequencies though?. For PWM, normally it is the mark/space ratio that matters, and the frequency is not that critical, which is why the modules share this resource.

Best Wishes
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