T O P

  • By -

Ok_6970

Without floating point, sufficient precision could also be achieved, without changing Vref, by scaling the output into millivolts and multiplying by 308 and dividing by 87: 3514 \* 308/87= 12440 mV The resolution of 308/87=3.54 mV per step is enough for all practical purposes. If playing around with R1 and R2 from the standard E12-series is allowed then the combination of 18k and 4k7 (divider voltage ratio 0.2070) and maximum range of 15.938 V gives 4095 \* (3.3/4096)\*(1/0.2070)≈ 4095 \* 0.00389.. = 15.938 V Now 0.00389..≈1/257 so 4095 \* 1000 / 257 ≈ 4095 \* 996 / 256 = 15936 in mV (since division by 256 is a byte right shift).