Electronic – the formula to convert the result of an 8-bit ADC to voltage

adc

I'm just struggling with one of the questions in my Computer Hardware assignment.

An 8-bit A-D conversion chip is configured to sense a voltage in the range 0 to 6V. Given an analog input voltage of 2.5V, determine, showing full working, what the 8-bit digital output should be.

So, using formula given by professor solution is:

2^8 = 256 so (2.5/6)/255 ≈ 0.002V

But, when I did some extra research, I found a different formula:

(2.5/6) * 255 = 106.25

So, which formula is correct and why?

Best Answer

(2.5/6)*255=106.25 is the correct formula.

You can check with:

  • sensed 0 => code 0
  • sensed 6V => code 255

and 2.5V is just above 1/3rd of the way, so code 100 of 255 looks correct (255/3 = 85)

6/255 = 0.0235 also has a meaning, it's the V/code value, to get back the sensed value from the code (106*0.0235 = 2,491V)