Skip to main content

Embedded Systems · Microcontrollers, memory-mapped I/O, and peripherals

A 12-bit ADC with V_REF=3.300 V and V_LSB=V_REF/4096 is read sixteen times in…

Problem

A 12-bit ADC with \(V_{\mathrm{REF}}=3.300\,\mathrm{V}\) and \(V_{\mathrm{LSB}}=V_{\mathrm{REF}}/4096\) is read sixteen times in succession on a DC input. The sixteen right-aligned codes, in the order taken, are \[ \begin{array}{cccccccc} 1550 & 1553 & 1549 & 1552 & 1551 & 1554 & 1550 & 1552\\ 1551 & 1553 & 1548 & 1552 & 1551 & 1550 & 1553 & 1551. \end{array} \] Software oversampling forms the integer sum \(S\) of the sixteen codes and the 14-bit result \[ N_{14}=\bigl\lfloor S/4\bigr\rfloor. \] The reconstructed oversampled voltage is \(\hat{v}_{14}=N_{14}\cdot V_{\mathrm{LSB}}/4\). The arithmetic mean of the sixteen reconstructed 12-bit voltages is \(\bar{v}=(S/16)V_{\mathrm{LSB}}\). Ignore missing codes. (a) Compute \(S\), \(N_{14}\), \(\hat{v}_{14}\), and \(\bar{v}\). Report voltages in millivolts. (b) Compute the unique 12-bit code \(N_{\mathrm{med}}\) obtained by sorting the sixteen samples and averaging the eighth and ninth in the ordered list (use the arithmetic mean, which may be a half-integer), and the corresponding voltage \(N_{\mathrm{med}}V_{\mathrm{LSB}}\). (c) Determine the sample standard deviation of the sixteen codes using the divisor \(15\), and convert that standard deviation to millivolts. Then compute the standard error of the mean \(s/\sqrt{16}\) in millivolts. (d) A second routine reports \(\hat{v}'=N_{14}\cdot V_{\mathrm{REF}}/16384\). Decide whether \(\hat{v}'=\hat{v}_{14}\) for every integer \(N_{14}\), and evaluate both reconstructions on the \(N_{14}\) of part (a).

Hint

Oversampling here is an integer sum followed by a power-of-two shift, not a floating-point average. The median of sixteen sorted samples sits between positions eight and nine.

Check your work

Work the problem yourself first. Then open it in Training to check your answer and read the full worked solution.

Create a free account to check your answer and see the solution. Create a free account.

More Embedded Systems practice problems

Back to Embedded Systems

An original ProofAnvil practice problem, written for this course. ProofAnvil is a practice course, not a homework-answer service.