2.3.51 ADC_InputSelect Function

C

void ADC_InputSelect(ADC_MUX muxType, ADC_INPUT_POSITIVE positiveInput, ADC_INPUT_NEGATIVE negativeInput);
void ADC_InputSelect(ADC_INPUT_POSITIVE positiveInput);

Summary

Selects input for ADC.

Description

This function selects positive and negative input for both the mux available on ADC module.

Precondition

  • ADC_Initialize() must have been called.

  • ADC module should be disabled.

Parameters

ParamDescription
muxTypeSelects one of the two available muxes.
positiveInputSelects one of the possible positive input from enum ADC_INPUT_POSITIVE
negativeInputSelects one of the possible positive input from enum ADC_INPUT_NEGATIVE

Returns

None.

Example

ADC_InputSelect(ADC_MUX_A, ADC_INPUT_POSITIVE_AN5, ADC_INPUT_NEGATIVE_VREFL);

Remarks

None.