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.

ADC) performs the conversion on.<br />

Availability:<br />

Examples:<br />

Example<br />

Files:<br />

Also See:<br />

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

set_sd_adc_channel(0);<br />

None<br />

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

set_timerA( )<br />

Syntax:<br />

Parameters:<br />

Returns:<br />

Function:<br />

Availability:<br />

Requires:<br />

Examples:<br />

set_timerA(value);<br />

An 8 bit integer. Specifying the new value of the timer. (int8)<br />

undefined<br />

Sets the current value of the timer. All timers count up. When a timer<br />

reaches the maximum value it will flip over to 0 and continue counting<br />

(254, 255, 0, 1, 2, …).<br />

This function is only available on devices with Timer A hardware.<br />

Nothing<br />

// 20 mhz clock, no prescaler, set timer A<br />

// to overflow in 35us<br />

set_timerA(81); // 256-(.000035/(4/20000000))<br />

Example Files:<br />

Also See:<br />

none<br />

get_timerA( ), setup_timer_A( ), TimerA Overview<br />

set_timerB( )<br />

Syntax:<br />

Parameters:<br />

Returns:<br />

set_timerB(value);<br />

An 8 bit integer. Specifying the new value of the timer. (int8)<br />

undefined<br />

276

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

Saved successfully!

Ooh no, something went wrong!