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.

Built-in Functions<br />

Function:<br />

Availability:<br />

Requires:<br />

Examples:<br />

Example Files:<br />

Also See:<br />

Sets the mode of the external memory bus.<br />

Only devices that allow external memory.<br />

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

setup_external_memory(EXTMEM_WORD_WRITE<br />

|EXTMEM_WAIT_0 );<br />

setup_external_memory(EXTMEM_DISABLE);<br />

None<br />

WRITE PROGRAM EEPROM() , WRITE PROGRAM MEMORY(),<br />

External Memory Overview<br />

setup_high_speed_adc( )<br />

Syntax:<br />

Parameters:<br />

Returns:<br />

Function:<br />

Availability:<br />

Requires:<br />

Examples:<br />

Example<br />

Files:<br />

Also See:<br />

setup_high_speed_adc (mode);<br />

mode – Analog to digital mode. The valid options vary depending on the device.<br />

See the devices .h file for all options. Some typical options include:<br />

· ADC_OFF<br />

· ADC_CLOCK_DIV_1<br />

· ADC_HALT_IDLE – The ADC will not run when PIC is idle.<br />

Undefined<br />

Configures the High-Speed ADC clock speed and other High-Speed ADC<br />

options including, when the ADC interrupts occurs, the output result format, the<br />

conversion order, whether the ADC pair is sampled sequentially or<br />

simultaneously, and whether the dedicated sample and hold is continuously<br />

sampled or samples when a trigger event occurs.<br />

Only on dsPIC33FJxxGSxxx devices.<br />

Constants are define in the device .h file.<br />

setup_high_speed_adc_pair(0, INDIVIDUAL_SOFTWARE_TRIGGER);<br />

setup_high_speed_adc(ADC_CLOCK_DIV_4);<br />

read_high_speed_adc(0, START_AND_READ, result);<br />

setup_high_speed_adc(ADC_OFF);<br />

None<br />

setup_high_speed_adc_pair(), read_high_speed_adc(), high_speed_adc_done()<br />

289

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

Saved successfully!

Ooh no, something went wrong!