khaleel.arya
Junior Member level 2

MPLAB8.8
dsPIC30F5011
Hi,
I am using a 12bit SAR [succesive approximation converter] adc for measurement and I am getting a variation of 15~20 mv difference with out sampling w.r.t DC Voltages.
i have used a crystal,primary oscillator of 8MHZ with 4 PLL
*************************************************************************
Fcy = Fosc/4 = (Source Osc freq * PLL mul)/(program post scalar *4)
Tcy = 1/ Fcy
A minimum of 333.33 ns is required for TAD,
TAD = (Tcy(ADCS + 1))/2
from this
ADCS = (2*TAD/Tcy) - 1
these are my initialisations fr adc convertion clock
---------------------------------------------------------------------------
-----------------------------------------------------------------------------------
is there any wrong with this calculation or any other suggestions to get accurate values
Regards
khaleel
dsPIC30F5011
Hi,
I am using a 12bit SAR [succesive approximation converter] adc for measurement and I am getting a variation of 15~20 mv difference with out sampling w.r.t DC Voltages.
i have used a crystal,primary oscillator of 8MHZ with 4 PLL
*************************************************************************
Fcy = Fosc/4 = (Source Osc freq * PLL mul)/(program post scalar *4)
Tcy = 1/ Fcy
A minimum of 333.33 ns is required for TAD,
TAD = (Tcy(ADCS + 1))/2
from this
ADCS = (2*TAD/Tcy) - 1
these are my initialisations fr adc convertion clock
---------------------------------------------------------------------------
Code:
ADCON3bits.SAMC = 14; // fr 12 bit ADc 14TAD
ADCON3bits.ADRC = 0; // Clock derived from system clock
ADCON3bits.ADCS = 5;
is there any wrong with this calculation or any other suggestions to get accurate values
Regards
khaleel
Last edited by a moderator: