Skip to content

Firmware Fundamentals — question 8 of 10

Write a real answer. It is graded against the question's rubric, and the mastery movement is computed by the same engine the product uses. Scoring here is deterministic rather than model-written, so this page costs nothing to run and nothing is saved. In a track built from your own posting, the same rubric is graded by the model, which is what produces feedback about your reasoning rather than about coverage.

Assume raw and the literal 3300 are both treated as 16-bit values in the intermediate arithmetic before the division happens.

A 10-bit ADC produces raw codes 0–1023 for an input referenced to 3300 mV. Firmware converts a reading to millivolts with: `uint16_t raw = 800; uint16_t mv = (raw * 3300) / 1023;` on a target where the compiler's `int` type is 16 bits wide, as is common on small 8/16-bit microcontrollers. First: what millivolt value should this reading mathematically represent? Then explain why the actual value this line computes on that target could be wrong, and how you'd rewrite it to be safe.

This one resolves to a number. Give the value in the field below and your reasoning in the box — the number is checked exactly, by arithmetic.

mV

Units and SI prefixes are understood, including schematic notation: 4k7, 2.2 uF, 1.5e-3 A.

How sure are you?

Being confidently wrong costs more mastery than admitting a guess — that is deliberate, and it is how misconceptions get found.

Neither is graded, and nothing here is recorded.