17.02.2015 Views

CCS C Compiler Manual PCB / PCM / PCH

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

period is an integer between 0 and 4095. The PWM time base is<br />

incremented until it reaches this number.<br />

compare is an integer between 0 and 255. This is the value that the<br />

PWM time base is compared to, to determine if a special event should<br />

be triggered.<br />

compare_postscale is an integer between 1 and 16. This postscaler<br />

affects compare, the special events trigger.<br />

dead_time is an integer between 0 and 63. This value specifies the<br />

length of an off period that should be inserted between the going off of a<br />

pin and the going on of it is a complementary pin.<br />

Returns:<br />

Function:<br />

Availability:<br />

Requires:<br />

undefined<br />

Initializes and configures the motor control Pulse Width Modulation<br />

(PWM) module.<br />

All devices equipped with motor control or power PWM module.<br />

None<br />

Examples:<br />

setup_power_pwm(PWM_CLOCK_DIV_4 | PWM_FREE_RUN |<br />

PWM_DEAD_CLOCK_DIV_4,1,10000,1000,0,1,0);<br />

Example Files:<br />

Also See:<br />

None<br />

set_power_pwm_override(), setup_power_pwm_pins(),<br />

set_power_pwmX_duty()<br />

setup_power_pwm_pins( )<br />

Syntax:<br />

Parameters:<br />

Returns:<br />

Function:<br />

Availability:<br />

Requires:<br />

setup_power_pwm_pins(module0,module1,module2,module3)<br />

For each module (two pins) specify:<br />

PWM_PINS_DISABLED, PWM_ODD_ON, PWM_BOTH_ON,<br />

PWM_COMPLEMENTARY<br />

undefined<br />

Configures the pins of the Pulse Width Modulation (PWM) device.<br />

All devices equipped with a power control PWM.<br />

None<br />

296

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!