An330 appendix a. using excel – Cirrus Logic AN330 REV2 User Manual
Page 10

10
AN330REV2
AN330
APPENDIX A. USING EXCEL
®
TO PRODUCE A NOISE HISTOGRAM PLOT
To use Excel
®
spreadsheet software to produce a noise histogram plot, one must first collect data samples from the
A/D output, put them into a decimal ASCII character-based format and get them into a file on a PC (personal com-
puter). There are many ways this can be achieved, but this is left as an exercise for the reader.
The size of the data file should be at least 50 samples. However, a data file having several hundred samples is pre-
ferred. A higher number of samples will result in a higher confidence in the computed results. Note that it is common
for software to collect binary multiples of samples, such as 256, 512, 1024, etc. The data can then be used for both
noise histograms and for fast Fourier transform (FFT) analysis.
Once the file is on the PC, launch the Excel spreadsheet software (the following is based upon Excel 2003 with SP2)
and use the Data > Import External Data > Import Data function to import your data file into an Excel spreadsheet.
It is helpful to use either spaces or commas in your file as delimiters for each conversion word.
Our example that follows will use the 256 samples captured from the CS3001/CS5513 combo circuit mentioned at
the beginning of this application note.
Once the data is entered into the spreadsheet, one can select a blank cell, then use Insert>Function>STDEV and
select the column of data. This will compute the standard deviation (in fractions of counts) and enter the result in
the selected cell.
This computation gives no indication whether the data collected actually exhibits a Gaussian or bell-shaped statis-
tical distribution. It is beneficial to examine a plot of the collected data to ascertain whether it is in fact, a bell-shaped
distribution.
In order to plot the histogram of the data collected one must first be certain that the Data Analysis Pak has been
installed into the Excel software. The Data Analysis Pak comes with the Excel application but is not necessarily
installed when the Excel software is installed on your PC. Therefore, look under Tools > Data Analysis… If Data
Analysis is not listed, select Add-Ins and then highlight the box for Analysis Pak and click OK. This will install the
data analysis package and should add a Data Analysis item under the Tools menu items.
Before using the Histogram function which is in the Data Analysis pak, more information is needed about the column
of data that was entered into the spreadsheet from the ADC. We must know the minimum code value and the max-
imum code value. These can be computed by selecting a blank cell, then using Insert> Function> MIN. This will re-
sult in placing the minimum value of the data set in the cell which has been selected. Then select another blank
cell, and use the Insert>Function>MAX to find the maximum value of the data set.
Once the MIN and the MAX of the data set are known, then produce a column of cells that contain a sequence of
numbers from the MIN value to the MAX value incremented by one. This can be accomplished manually, or one
can enter the MIN value into a cell, then use the Edit > Fill > Series > Column > linear and enter the MAX code value
for the Stop value. This should result in a column of numbers starting at the MIN of the data set, incrementing by
one up to the MAX of the data set.
Once this is completed you should have two columns, one holding your data set of conversion output words from
the ADC and a second column that increases from the MIN value to the MAX value of the data set.
Using these two columns of data one can produce a histogram frequency table. Use
Tools > Data Analysis > Histogram Enter the spreadsheet cell range for the ADC samples in the Input Range se-
lection and the MIN to MAX code range in the Bin Range. If the Output option New Worksheet Ply is selected the
histogram results will appear on a new spreadsheet page.