# ADCToolbox - MATLAB
A comprehensive MATLAB toolbox for ADC (Analog-to-Digital Converter) testing, characterization, and debugging. This toolbox provides advanced functions for spectral analysis, calibration, linearity testing, signal processing, and performance evaluation of ADCs.
## Function Categories
### Spectral Analysis
Functions for analyzing the frequency-domain characteristics of ADC output data.
- **`plotspec`** - Comprehensive spectrum analysis with ENOB, SNDR, SFDR, SNR, and THD calculations
- **`plotphase`** - Coherent phase spectrum analysis with polar display
### Signal Fitting and Frequency Analysis
Functions for extracting signal parameters and frequency information.
- **`sinfit`** - Four-parameter iterative sine wave fitting (amplitude, phase, DC, frequency)
- **`findfreq`** - Find dominant frequency using sine wave fitting
- **`findbin`** - Find coherent FFT bin for a given signal frequency
- **`tomdec`** - Thompson decomposition of signal into sinewave, harmonics, and errors
### Calibration Functions
Functions for calibrating ADC bit weights and correcting errors.
- **`wcalsine`** - Weight calibration using sine wave input (single or multi-dataset)
- **`cdacwgt`** - Calculate bit weights for multi-segment capacitive DAC
- **`plotwgt`** - Visualize bit weights with radix annotations
### Linearity and Error Analysis
Functions for analyzing ADC linearity performance.
- **`inlsin`** - Calculate INL and DNL from sine wave data using histogram method
- **`errsin`** - Analyze sine wave fit errors with histogram binning
### Noise Transfer Function Analysis
Functions for analyzing noise-shaping ADCs (Delta-Sigma modulators).
- **`ntfperf`** - Analyze noise transfer function performance and SNR improvement
### Utility Functions
Supporting functions for signal processing and analysis.
- **`alias`** - Calculate aliased frequency after sampling
- **`ifilter`** - Ideal FFT-based filter to retain specified frequency bands
- **`ovfchk`** - Check ADC overflow by analyzing bit segment residue distributions