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

setup_opamp1( ) setup_opamp2( )<br />

Syntax:<br />

Parameters:<br />

Returns:<br />

Function:<br />

Availability:<br />

Requires:<br />

Examples:<br />

Example Files:<br />

Also See:<br />

setup_opamp1(enabled)<br />

setup_opamp2(enabled)<br />

enabled can be either TRUE or FALSE.<br />

undefined<br />

Enables or Disables the internal operational amplifier peripheral of certain<br />

PICmicros.<br />

Only parts with a built-in operational amplifier (for example, PIC16F785).<br />

Only parts with a built-in operational amplifier (for example, PIC16F785).<br />

setup_opamp1(TRUE);<br />

setup_opamp2(boolean_flag);<br />

None<br />

None<br />

setup_oscillator( )<br />

Syntax:<br />

Parameters:<br />

setup_oscillator(mode, finetune)<br />

mode is dependent on the chip. For example, some chips allow speed<br />

setting such as OSC_8MHZ or OSC_32KHZ. Other chips permit changing<br />

the source like OSC_TIMER1.<br />

The finetune (only allowed on certain parts) is a signed int with a range of<br />

-31 to +31.<br />

Returns:<br />

Function:<br />

Some chips return a state such as OSC_STATE_STABLE to indicate the<br />

oscillator is stable .<br />

This function controls and returns the state of the internal RC oscillator on<br />

some parts. See the devices .h file for valid options for a particular device.<br />

Note that if INTRC or INTRC_IO is specified in #fuses and a #USE<br />

DELAY is used for a valid speed option, then the compiler will do this<br />

setup automatically at the start of main().<br />

293

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

Saved successfully!

Ooh no, something went wrong!