Data converter (source code)

= Data converter

A <data converter> translates between an analog quantity and a digital representation. An <analog-to-digital converter> assigns a code to a measured input; a <digital-to-analog converter> produces an analog output from a code. The finite code set imposes <quantization (signal processing)>, while <signal sampling> determines which times are represented. These are distinct limitations.

For an original ideal model, take an unsigned $N$-bit converter covering $0\le V<V_{\rm FS}$ with step $\Delta=V_{\rm FS}/2^N$. Code $k=\lfloor V/\Delta\rfloor$ identifies one interval. Reconstructing at its midpoint gives $\widehat V=(k+\tfrac12)\Delta$ and $|\widehat V-V|\le\Delta/2$. This bounds the error of an ideal uniform quantizer; the probabilistic <uniform quantization error> model requires further assumptions about the inputs.<MT-001: Taking the Mystery out of the Infamous Formula by Walt Kester>[Pages 1–3, ideal converter levels and quantization error]{ref}

\Image[/ideal-converter-midpoint-quantization.png]
{title=Ideal three-bit <data converter> with midpoint reconstruction}
{description=Original analytical model with a 1 V full-scale range, eight uniform bins and an explicit midpoint reconstruction convention. The error is the reconstructed value minus the input.}

An experiment can slowly sweep a known input and record the transition locations between codes. Unequal step sizes, missing codes and gain or offset errors then become distinguishable from the ideal quantization limit. A changing input adds separate questions about settling and the acquisition time. Quoting only the number of <bits> therefore does not characterize the complete measurement system.