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
- GPIOA on Anvil-M0 provides three 32-bit registers that affect the same 16 output…Microcontrollers, memory-mapped I/O, and peripherals
- USART2 is clocked by f_CK=36.00 MHzInterrupts, concurrency, and shared state
- A UART RX FIFO is 16 bytes deepInterrupts, concurrency, and shared state
- A complementary PWM pair drives one leg of an H-bridgeTimers, scheduling, and real-time constraints
- Two 16-bit timers are cascaded to form a 32-bit timestampTimers, scheduling, and real-time constraints
- A brushless-DC commutation computer runs two independent implicit-deadline periodic…Serial buses and communication protocols
- A single fully preemptive uniprocessor hosts three independent implicit-deadline…Serial buses and communication protocols
- Standard-mode I^2C requires t_LOW≥ 4.70 μs and t_HIGH≥ 4.00 μs on SCL, t_r≤ 1.00 μs…Memory, energy, and reliability budgets
- A two-door airlock is modelled by Boolean variables L and R, each 1 when that door is…State-machine verification and safety boundaries