Check: Decode and sample faithfully

Knowledge check · self-test
Check: Decode and sample faithfully
Decode signed fields, predict aliases, calculate memory, and justify filtering and oversampling.
Decode signed fields, predict aliases, calculate memory, and justify filtering and oversampling.
Use a boundary test before trusting the driver. Feed it 0x000, 0x001, 0x7FF, 0x800, and 0xFFF. The expected signed outputs are 0, 1, 2047, -2048, and -1. Those five cases expose off-by-one thresholds, missing sign extension, and accidental unsigned casts faster than testing only room-temperature readings.
Decode the lowest, zero, highest, and one known negative sample with the released rules. Keep raw bytes, ADC width, byte order, signedness, scale, unit, firmware version, expected value, and result.
Back to Analog-Digital Boundaries: Signal Contracts: Summary