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.

READ_EXTERNAL_MEMORY (address, dataptr, count );<br />

Parameters:<br />

Returns:<br />

Function:<br />

Availability:<br />

Requires:<br />

Examples:<br />

Example Files:<br />

Also See:<br />

address is 16 bits on <strong>PCM</strong> parts and 32 bits on <strong>PCH</strong> parts . The least<br />

significant bit should always be 0 in <strong>PCM</strong>.<br />

dataptr is a pointer to one or more bytes.<br />

count is a 8 bit integer on PIC16 and 16-bit for PIC18<br />

undefined<br />

Reads count bytes from program memory at address to RAM at dataptr.<br />

B oth of these functions operate exactly the same.<br />

Only devices that allow reads from program memory.<br />

Nothing<br />

char buffer[64];<br />

read_external_memory(0x40000, buffer, 64);<br />

None<br />

write program memory( ), External memory overview , Program Eeprom<br />

Overview<br />

read_high_speed_adc( )<br />

Syntax:<br />

read_high_speed_adc(pair,mode,result);<br />

read or<br />

read_high_speed_adc(pair,result);<br />

read<br />

read_high_speed_adc(pair);<br />

read_high_speed_adc(mode,result);<br />

or<br />

read_high_speed_adc(result);<br />

read_high_speed_adc();<br />

// Individual start and<br />

// read only<br />

// Individual start and<br />

// Individual start only<br />

// Global start and read<br />

// read only<br />

// Global start and read<br />

// Global start only<br />

Parameters:<br />

pair – Optional parameter that determines which ADC pair number to<br />

start and/or read. Valid values are 0 to total number of ADC pairs. 0<br />

starts and/or reads ADC pair AN0 and AN1, 1 starts and/or reads ADC<br />

pair AN2 and AN3, etc. If omitted then a global start and/or read will be<br />

performed.<br />

mode – Optional parameter, if used the values may be:<br />

· ADC_START_AND_READ (starts conversion and reads<br />

result)<br />

248

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

Saved successfully!

Ooh no, something went wrong!