The calculated Hex values for the various voltages are calculated below;
0.5V = 0.5/(5/255) = 25.5 ~ 26 = 1A Hex code 1.5V = 1.5V/(5V/255) = 76.5 ~ 77 = 4D Hex code 2.5V = 2.5V/(5V/255) = 127.5 ~ 126 = 7E Hex code 3.5V = 3.5V/(5V/255) = 178.5 ~ 179 = B3 Hex code 4.5V = 4.5V/(5V/255) = 229.5 ~ 230 = E6 Hex code 1.2 The measured values for the various voltages are shown below; 0.5V = 19 1.5V = 4C 2.5V = 7F 3.5V = B3 4.5V = E6 The calculated values are higher than the measured values; this is mainly due to the rounding off so as to get a whole number during the calculation of the hex code value. The difference is due to this. Continue reading...