4.7.2 Wait for ADC to Compete

From the adcc.c module, use the function:

bool ADC_IsConversionDone()

This function returns the negated value of the ADCON0bits.ADGO bit (defined in the device header file). However, the actual value of this bit is desired in the main while loop, so the return value is negated again.