Hi,
I am trying to read values from my ADC conversion but I get something unusual. The say Value Out of Scope. Has anyone faced the same challenge?
I used MPlab CCG and here are some of the the functions for getting the ADC value.
adc_result_t ADC1_GetConversionResult(void)
{
// Conversion finished, return the result
return ((adc_result_t)((ADRESH << 8) + ADRESL));
}
ADC1_SelectChannel(0);
ADC1_StartConversion();
ADC1_IsConversionDone();
while(ADCON0bits.GO_nDONE);
result = ADC1_GetConversionResult;
The value at the result shows as Out of Scope.
Any thoughts?
I am trying to read values from my ADC conversion but I get something unusual. The say Value Out of Scope. Has anyone faced the same challenge?
I used MPlab CCG and here are some of the the functions for getting the ADC value.
adc_result_t ADC1_GetConversionResult(void)
{
// Conversion finished, return the result
return ((adc_result_t)((ADRESH << 8) + ADRESL));
}
ADC1_SelectChannel(0);
ADC1_StartConversion();
ADC1_IsConversionDone();
while(ADCON0bits.GO_nDONE);
result = ADC1_GetConversionResult;
The value at the result shows as Out of Scope.
Any thoughts?