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 Instruction

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



Joined: 25 Mar 2010
Posts: 8

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

PWM Instruction
PostPosted: Sun Apr 18, 2010 4:06 pm     Reply with quote

Hi
I want to know what is difference between two modes of PWM instruction?
Code:

setup_ccp1(CCP_PWM);
set_pwm1_duty(value);
setup_timer_2(T2_DIV_BY_16,PR,1)

and
Code:

setup_power_pwm(modes, postscale, time_base, period,compare,compare_postscale, dead_time)
set_power_pwm_override(pwm, override, value)
setup_power_pwm_pins(module0,module1,module2,module3)
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Apr 18, 2010 5:21 pm     Reply with quote

The first set is used with the ordinary PWM module (CCP) in a PIC.

The 2nd set is used with the Power Control PWM module.
This module has many more features than the ordinary PWM
module (CCP) and it is specifically designed to control motors.
saeidjabbari



Joined: 25 Mar 2010
Posts: 8

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

PostPosted: Mon Apr 19, 2010 4:17 am     Reply with quote

Thanks A lot PCM programmer
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