Skip to main content

Check Your Understanding 6.1.5 Check Your Understanding

1.

A 12-bit ADC has \(V_\text{ref} = 3.3\text{ V}\text{.}\) What voltage does one LSB represent, and what is the maximum representable voltage?
  • One LSB ≈ 0.81 mV; maximum representable voltage ≈ 3.299 V (count 4095).
  • Correct. One LSB = 3.3 V / 4096 ≈ 0.806 mV. Count 4095 gives \(4095 \times 3.3/4096 \approx 3.299\text{ V}\text{,}\) not quite 3.3 V, because there are 4096 steps but the highest is numbered 4095.
  • One LSB ≈ 0.81 mV; maximum representable voltage = 3.3 V (count 4096).
  • The LSB value is right, but a 12-bit ADC produces counts 0–4095. Count 4096 does not exist, since it would need a 13th bit.
  • One LSB = 3.3 V; maximum = 4095 V.
  • The LSB is a small fraction of \(V_\text{ref}\text{,}\) not equal to it, and the maximum output is a count rather than a voltage.
  • One LSB = 12 mV; maximum representable voltage = 3.3 V.
  • About 12 mV would be the LSB of an 8-bit ADC (3.3 V / 256 ≈ 12.9 mV). With 12 bits the step is much smaller.

2.

Your ADC reports a count of 1241 with \(V_\text{ref} = 3.3\text{ V}\) and 12-bit resolution. What voltage is on the pin, to the nearest 0.01 V?
  • About 1.00 V
  • Correct: \(1241 \times 3.3/4096 \approx 0.9998\text{ V}\text{.}\) This is the conversion you will do constantly: count times \(V_\text{ref}\text{,}\) divided by 4096.
  • About 1.24 V
  • This reads the count as millivolts directly. The count is a number of steps; each step is worth about 0.806 mV, not 1 mV.
  • About 0.30 V
  • This divides instead of multiplying. A count well below half of 4095 must give a voltage well below half of 3.3 V, but not that far below. Check the direction of the ratio.
  • About 3.30 V
  • 3.3 V corresponds to the top of the range, count 4095. A count of 1241 is roughly 30% of full scale.

3.

A 10 kΩ potentiometer has its outer terminals wired to 3.3 V and GND. You turn the knob until the wiper is one quarter of the way up from the GND end. What voltage does the ADC see, and roughly what count?
  • About 0.83 V, giving a count near 1024.
  • Correct. A quarter of the way up the track puts the wiper at a quarter of the supply, \(3.3/4 = 0.825\text{ V}\text{,}\) which is a quarter of full scale: \(4096/4 = 1024\) counts. Fractions of the track map directly onto fractions of full scale.
  • About 2.48 V, giving a count near 3072.
  • That is three quarters of the supply, the reading you would get a quarter of the way down from the 3.3 V end. Check which terminal the wiper is near.
  • About 0.83 V, giving a count near 830.
  • The voltage is right, but the count is not millivolts. Divide by the LSB size: \(0.825 / 0.000806 \approx 1024\text{.}\)
  • 2.5 kΩ, which the ADC reads directly as resistance.
  • The ADC measures voltage only. The potentiometer’s resistance matters because it forms a divider, but what reaches the pin, and what is converted, is a voltage.

4.

You start a conversion by writing to the control register, then immediately read the result register. The value is wrong or stale regardless of the input voltage. Why?
  • The conversion is not finished yet; the result register does not hold this conversion’s answer until the converter signals that it is done.
  • Correct. Successive approximation needs one comparison per bit, so the answer takes many clock cycles to appear. Code must wait for the end-of-conversion signal before reading. You will write exactly that wait in class.
  • The pin must be configured as an output before a conversion can start.
  • The opposite: the pin must be in analog mode so the converter can reach the voltage on it. Driving it as an output would fight whatever is connected.
  • The result is a floating-point value that must be cast before it can be interpreted.
  • The result register holds an unsigned integer count between 0 and 4095. No floating point is involved unless you choose to convert counts to volts.
  • The ADC cannot measure voltages near 0 V.
  • 0 V is a perfectly valid input and produces a count of 0. The problem here is timing, not the input level.

5.

A 3-bit successive-approximation ADC is measuring an input. How many comparisons does it make to produce a complete result?
  • 3: one per bit, starting from the most significant.
  • Correct. Successive approximation is a binary search: each comparison resolves exactly one bit, so an \(N\)-bit result needs \(N\) comparisons.
  • 7: one for each possible output value minus one.
  • That describes a flash ADC, which uses \(2^N - 1\) comparators simultaneously and gets its answer in one step. It is much faster and much larger; successive approximation trades time for silicon.
  • 8: one for each possible output value.
  • 8 is the number of possible outputs of a 3-bit converter, not the number of comparisons needed to choose between them. A binary search over 8 values takes 3 steps.
  • 1: the comparator resolves the result in a single step.
  • One comparison tells you only whether the input is above or below one test voltage. That is a single bit. Three bits need three comparisons.