/* ADC Differential mode. 
This function configures the ADC as differential mode and converts the differential voltage applied on positive input and negative input. Prints the differential voltage on serial console and disable the ADC.  */
void adc_differential(void)
/* ADC Differential mode. 
This function configures the ADC as differential mode and converts the differential voltage applied on positive input and negative input. Prints the differential voltage on serial console and disable the ADC.  */
void adc_differential(void)
{
	int16_t raw_result_signed;
	configure_adc_differential();
	raw_result = adc_start_read_result();
	raw_result_signed = (int16_t)raw_result;	result = ((float)raw_result_signed * (float)ADC_REFERENCE_INTVCC1_VALUE)/(float)ADC_11BIT_FULL_SCALE_VALUE;
	printf("\nDifferential Voltage on ADC Input = %fV", result);
	adc_disable(&adc_instance);
}