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 />

<br />

<br />

<br />

<br />

SDADC_GAIN_1<br />

SDADC_NO_DITHER<br />

SDADC_SVDD_SVSS<br />

SDADC_BW_NORMAL<br />

settings2- settings for the SD1CON2 register of the SD ADC module. See the<br />

device's .h file for all options. Some options include:<br />

SDADC_CHOPPING_ENABLED<br />

SDADC_INT_EVERY_SAMPLE<br />

SDADC_RES_UPDATED_EVERY_INT<br />

SDADC_NO_ROUNDING<br />

settings3- settings for the SD1CON3 register of the SD ADC module. See the<br />

device's .h file for all options. Some options include:<br />

SDADC_CLOCK_DIV_1<br />

SDADC_OSR_1024<br />

SDADC_CLK_SYSTEM<br />

Returns:<br />

Function:<br />

Availability:<br />

Examples:<br />

Example<br />

Files:<br />

Also See:<br />

Nothing<br />

To setup the Sigma-Delta Analog to Digital Converter (SD ADC) module.<br />

Only devices with a SD ADC module.<br />

setup_sd_adc(SDADC_ENABLED | SDADC_DITHER_LOW,<br />

SDADC_CHOPPING_ENABLED |<br />

SDADC_INT_EVERY_5TH_SAMPLE |<br />

SDADC_RES_UPDATED_EVERY_INT, SDADC_CLK_SYSTEM |<br />

SDADC_CLOCK_DIV_4);<br />

None<br />

set_sd_adc_channel(), read_sd_adc(), set_sd_adc_calibration()<br />

setup_spi( ) setup_spi2( )<br />

Syntax:<br />

Parameters:<br />

setup_spi (mode)<br />

setup_spi2 (mode)<br />

mode may be:<br />

SPI_MASTER, SPI_SLAVE, SPI_SS_DISABLED<br />

SPI_L_TO_H, SPI_H_TO_L<br />

SPI_CLK_DIV_4, SPI_CLK_DIV_16,<br />

SPI_CLK_DIV_64, SPI_CLK_T2<br />

301

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

Saved successfully!

Ooh no, something went wrong!