Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] 12 bit ADC measurement problem

Status
Not open for further replies.

khaleel.arya

Junior Member level 2
Joined
Apr 10, 2015
Messages
23
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Location
INDIA
Activity points
155
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
---------------------------------------------------------------------------
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:

independent ground in the sense?
can you explain it briefly
 

I didn't seen your PCB. For reference voltages reasonable to use intependend ground and supply, connected via low pass filter, based on inductor and capacitor.
 

What are the voltages you are expecting to measure - in other words what is the relative error of the 15-20mV.
12-bit ADCs mean that the last bit is 1/4096 of the maximum range. If you are trying to measure (say) 0 to 5V then the bottom bit is +/- 1mV.
However, unless you are dealing with a *VERY* (electrical) noise-free environment, the best you can typically expect to measure with an ADC is something like 8 (+/-0.5%) or perhaps 10 bits (+/- 0.1%). That is just the nature of electrical signals .
Susan
 

sorry for late reply,

I have connected a keypad which is made with different resistors and provides different voltages when i press the different buttons.when i compare the voltages im getting with voltages shown by multi meter it showing a difference of 15-20mv.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top