A technician must decide whether reported ten-bit code is safe before changing adc input voltage on the real device. The result is unresolved until the rule and units are checked. Predict the direction first.
See the relationship before changing it
The figure reads from left to right. The blue card is adc input voltage. The middle card applies this page's rule. The green card is reported ten-bit code. Walk the arrows once: set the input, apply the rule, then read the result with its unit.
The retained audit below checks several chapter fixtures. This model keeps those stated values fixed and changes only adc input voltage, so the numeric fixture does not switch without explanation.
Derive the baseline in four named moves
- 1
Name the input. The chapter baseline is 1.65 V.
- 2
Name the relationship. code = floor((input / 3.3 V) x (2^10 - 1))
- 3
Substitute with units. floor((1.65 / 3.3) x 1,023) = 511 counts
- 4
Read the result. Keep the unit beside the value. Use it only inside the technical boundary on this page.
Predict, then change adc input voltage
Try Predict the direction of code = floor((input / 3.3 V) x (2^10 - 1)). Test another adc input voltage, then compare reported ten-bit code.
Observe The converter reports an integer code rather than a continuous voltage. Reset adc input voltage to 1.65 and compare reported ten-bit code.
Explain The converter reports an integer code rather than a continuous voltage.
Check yourself
What should you do before trusting a moved-control result?
What does this small model leave out?
1. Start with the physical story
An ADC freezes voltage at one instant and assigns it to one integer bin. More bits make narrower bins, but the result is still rounded. Sampling adds a second grid in time, so fast tones may fold into the kept band.
2. Name every algebra move
Count bins2¹⁰=1024 bins and endpoint codes 0–1023.
Find bin widthq=Vref/1024.
Choose the integer codeFloor (Vin/Vref)×1023.
Reconstruct voltageMultiply D/1023 by Vref.
Check limitsUse 6.02N+1.76 for ideal SNR and fs/2 plus folding for time.
3. Reproduce the chapter case
D=floor[(1.65/3.3)1023]=511
Vest=3.3(511/1023)=1.64839 V
error=−1.613 mV; SNRideal=62.0 dB
fN=8/2=4 kHz; |20−2(8)|=4 kHz
The endpoint formula maps exactly 3.3 V to code 1023, while q uses 1024 equal bins. Keeping those roles separate avoids an off-by-one error.
4. Try one real input
TryMove input voltage and predict the integer code and reconstructed voltage.
ObserveThe code changes in steps rather than continuously. SNR and alias stay fixed because bit depth and sample rate did not move.
ExplainThe integer code is an amplitude decision. The 20 kHz fold is a time-sampling decision made before software sees that code stream.
This uses ideal endpoint scaling, a stable 3.3 V reference, and an ideal full-scale sine SNR model.
- ADC
- Offset, gain, INL, DNL, aperture jitter, input settling, and clipping add error.
- Reference
- Noise, tolerance, drift, loading, and grounding move every code boundary.
- Signal
- An analogue filter must attenuate unwanted energy before sampling; digital cleanup cannot undo folding.
Correct, not complete: this ledger does not certify an ADC channel or anti-alias design.
5. Use the result in the design
Match reference and bit depth to the sensor span, check source settling and reference error, then choose a sample rate and analogue filter from the signal bandwidth.
6. Record the evidence state
Record converter and mode, reference and measurement, input range and source impedance, code rule, sample rate, filter response, raw codes, reconstructed units, and calibration residuals.
7. Check yourself
Why are there 1024 bins but maximum code 1023?
Why reconstruct with 1023 here?
Can software remove the 20 kHz tone after it folds to 4 kHz?
The arithmetic reproduces the chapter's 10-bit, 3.3 V, 1.65 V case and its 8 kHz/20 kHz alias example.
- ADC
- Offset, gain, INL, DNL, aperture jitter, input settling, and clipping add error.
- Reference
- Noise, tolerance, drift, loading, and grounding move every code boundary.
- Signal
- An analogue filter must attenuate unwanted energy before sampling; digital cleanup cannot undo folding.
Correct, not complete: this ledger does not certify an ADC channel or anti-alias design.
Eddie guides