Instructions

235 C-Control Pro IDE
© 2013 Conrad Electronic
ADC_REF06VDD
internal 0.6 x VDDANA Reference
ADC_ADCREF0
external ADCREF0 Reference
ADC_ADCREF1
external ADCREF1 Reference
5.4.2.3 ADC_GetValue
ADC Functions
Syntax
int ADC_GetValue(byte indx);
Sub ADC_GetValue(indx As Byte) As Integer
Description
The function reads a measured value from the A/D-converter. The indx parameter corresponds to the entry
in the inputs array in ADC_Enable(). If the value ADC_GET_WAIT (80 Hex) is ORed to indx, then the function
waits for the completion of all ADC measurements before the value is returned.
The ADC_GET_WAIT functionality should not be used in "free running" mode, or when the ADC is
switched off.
Parameter
indx index of measured A/D value
Return Parameter
measured A/D value
5.4.2.4 ADC_GetValues
ADC Functions
Syntax
void ADC_GetValues(int values[], byte cnt);
Sub ADC_GetValues(Byref values As Integer, cnt As Byte)
Description
The function read the measured values from the A/D-converter and copies them into a 16-bit array. If the
value ADC_GET_WAIT (80 Hex) is ORed to cnt, then the function waits for the completion of all ADC meas-
urements before the values are copied.
The ADC_GET_WAIT functionality should not be used in "free running" mode, or when the ADC is
switched off.
Parameter