Skip to main content

Subsection 6.1.4 Successive Approximation: How the Answer Is Found

Our ADC finds its answer by successive approximation, which is a binary search carried out in hardware. Rather than comparing the input against all 4096 possible levels, it determines the result one bit at a time, starting from the most significant bit.
Inside the ADC converter are a DAC (digital-to-analog converter) and a comparator. The converter keeps a register (the successive approximation register, or SAR) holding its answer so far. At each step it sets the next bit of the SAR, the DAC turns the SAR’s current value into a test voltage, and the comparator reports whether the input is above or below it. If the input is above, the bit stays set; if below, it is cleared. After \(B\) comparisons the SAR holds the result.
One more part is needed: a sample-and-hold circuit at the input captures the voltage at the instant the conversion begins and holds it steady for the converter to work against, even if the input voltage changes in the meantime.
Figure 6.1.4. Inside a successive-approximation ADC. The SAR holds the answer under construction and drives the DAC, which converts that value into a test voltage using \(V_\text{ref}\text{.}\) The diagram is drawn for our 12-bit converter: the SAR holds bits \(b_{11}\) down to \(b_0\text{,}\) so the search takes 12 comparisons. The comparator compares the held input against the test voltage and feeds its verdict, \(V_c\text{,}\) back to the SAR, which keeps or clears the bit it is currently testing and moves on to the next. The sample-and-hold circuit on the input freezes \(V_\text{in}\) at the instant the conversion starts. The clock input on the left paces the search: one comparison, and so one bit of the answer, per clock.
That is why the voltage on the pin may change freely during a conversion without corrupting the result: the converter is working from its snapshot, not from the live input.
Because each bit costs one comparison, a conversion takes many clock cycles rather than happening instantly. Your code must therefore wait for the converter to finish before reading the result. The exact mechanism is one of the things we’ll explore in class.