i have plotted output Vs input function for 2nd order ADC without missing any codes.
I just swept my DC input from 0 to 3 V and got my output codes for 14 bit ADC.
Now i wanted to plot DNL(in LSB) and INL(in LSB) plots with respect to input of ADC. for that i referred the code at below mentioned link.
http://inst.eecs.berkeley.edu/~n247/matlab_files/inldnl.mnow my doubt is
1) it asks 'input argument' as output of ADC,
% compute histogram
[counts,centers] = hist(x, min(x):delta:max(x));
but it gives DNl values in huge range like 5000 max and minimum 0..which is weird !!
2) it plots graph between DNL(in lSB) Vs bins but i need to plot it against input voltage...how to change that becoz while plotting the DNL values have more values then input?
3) in the following line of code,
title(sprintf('DNL and INL of %.1g Bit converter (from histogram testing)', ...
log2(N)));
why it always gives wrong value of converter resolution becoz N is based on length of DNL and DNL is based on counts ehich is very very high due to min(x):LSB:max(x) line in code? now how to rectify it in the given code ?
please help me regarding this
thanks in advance..