17.02.2015 Views

CCS C Compiler Manual PCB / PCM / PCH

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Built-in Functions<br />

increment/decrement options, Address enable bits, and various strobe<br />

and delay options.<br />

Availability:<br />

Requires:<br />

Only the devices with a built-in Parallel Master Port module.<br />

Constants are defined in the device's .h file.<br />

Examples:<br />

setup_psp(PAR_ENABLE| //Sets up Master mode with address<br />

PAR_MASTER_MODE_1|PAR_ //lines PMA0:PMA7<br />

STOP_IN_IDLE,0x00FF);<br />

Example Files:<br />

None<br />

Also See: setup_pmp( ), pmp_address( ), pmp_read( ), psp_read( ), psp_write( ),<br />

pmp_write( ), psp_output_full( ), psp_input_full( ), psp_overflow( ),<br />

pmp_output_full( ), pmp_input_full( ), pmp_overflow( )<br />

See header file for device selected<br />

setup_power_pwm( )<br />

Syntax:<br />

Parameters:<br />

setup_power_pwm(modes, postscale, time_base, period, compare,<br />

compare_postscale, dead_time)<br />

modes values may be up to one from each group of the following:<br />

PWM_CLOCK_DIV_4, PWM_CLOCK_DIV_16,<br />

PWM_CLOCK_DIV_64, PWM_CLOCK_DIV_128<br />

PWM_DISABLED, PWM_FREE_RUN, PWM_SINGLE_SHOT,<br />

PWM_UP_DOWN, PWM_UP_DOWN_INT<br />

PWM_OVERRIDE_SYNC<br />

PWM_UP_TRIGGER,<br />

PWM_DOWN_TRIGGER<br />

PWM_UPDATE_DISABLE, PWM_UPDATE_ENABLE<br />

PWM_DEAD_CLOCK_DIV_2,<br />

PWM_DEAD_CLOCK_DIV_4,<br />

PWM_DEAD_CLOCK_DIV_8,<br />

PWM_DEAD_CLOCK_DIV_16<br />

postscale is an integer between 1 and 16. This value sets the PWM<br />

time base output postscale.<br />

time_base is an integer between 0 and 65535. This is the initial value of<br />

the PWM base<br />

295

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

Saved successfully!

Ooh no, something went wrong!