I always use ADC with internal reference, and use ADC_Read() function.
I looked at the mikroC help and it shows this.
In the Note: it says "This function doesn't work with the external voltage reference source, only with the internal voltage reference."
In my current project I set the Vref as external. GND and +5V applied to Vref Pin.
I am confused a bit.
Can any one explain this. Please.
Another question.
Somewhere I read ;
by using "ADC_Read" , The ADC is first initialized and then Pin is Read.
by using "ADC_Get_Sample" , The ADC is not initialized but just Read.So here I must use "ADC_Init(); " in main just like" LCD_Init();"
Is my understanding correct ?
And the time taken is smaller in "ADC_Get_Sample" than "ADC_Read" as the ADC is initialized before hand in "Main".
I looked at the mikroC help and it shows this.
In the Note: it says "This function doesn't work with the external voltage reference source, only with the internal voltage reference."
In my current project I set the Vref as external. GND and +5V applied to Vref Pin.
C:
ADCON1.ADFM = 1; // A/D Right Justified.
ADCON1.VCFG1 = 1; // External Vref-.
ADCON1.VCFG0 = 1; // External Vref+.
Can any one explain this. Please.
Another question.
Somewhere I read ;
by using "ADC_Read" , The ADC is first initialized and then Pin is Read.
by using "ADC_Get_Sample" , The ADC is not initialized but just Read.So here I must use "ADC_Init(); " in main just like" LCD_Init();"
Is my understanding correct ?
And the time taken is smaller in "ADC_Get_Sample" than "ADC_Read" as the ADC is initialized before hand in "Main".