power pwm parameters for pic18f4520

Status
Not open for further replies.

flower2007

Newbie level 6
Joined
Jul 19, 2007
Messages
12
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Visit site
Activity points
1,362
I want to compile the following line of code for pic18f4520 controller ,but it gives an error message (Undefined Identifier setup_power_pwm) .


setup_ccp1(ccp_pwm, ccp_pwm_full_bridge);

setup_power_pwm(PWM_CLOCK_DIV_4 | PWM_FREE_RUN |PWM_DEAD_CLOCK_DIV_4,1,0,255,0,1,0);

I want to use the ECCP module to drive full bridge out put stage. I am using ccs pch compiler.
any one help me explaining power pwm parameter for the said controller.

thanks.
 

Can you post the full code. Is it the function declaration line giving error or is it the function call or function definition?

The function prototype is like this

Code:
setup_power_pwm(modes, postscale, time_base, period, compare, compare_postscale, dead_time) 

setup_power_pwm(PWM_CLOCK_DIV_4|PWM_FREE_RUN|PWM_DEAD_CLOCK_DIV_2|PWM_OVERRIDE_SYNC,1,0,255,0,1,0); 
setup_power_pwm_pins(PWM_ODD_ON,PWM_ODD_ON,PWM_OFF,PWM_OFF);
 

The function declaration line giving error.
Unfortunately it is not defined in the pic18f4520 header file.
Now the question is, Whether the power pwm function can be used for this controller.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…