AD-Converting value


I have a question about the AD-Converting values. When I give out the values which where saved per DMA in the Scan_Buffer array after the AD-conversion I get values like 2985 at 0V and 0005 at 1,5V.
Can someone please explain me, how I can calculate the analog value of a “Scan_Buffer”-value, so that I can give out the analog value which I measure at the Input of my oscilloscope?

Thanks a lot.


The file “function.c” contains a function AdcToSig that calculates the analog value.
As you can see, the value is reversed, a large ADC value corresponds to a small analog value.

Function Name : AdcToSig
Description : scale ADC reading to screen
int AdcToSig(int adc)
int sig;

sig = Km[Item_Index[Y_SENSITIVITY]] * (2048 - adc) / 4096 + 120 + (Item_Index[CALIBRATE_OFFSET] - 100);
sig += sig * (Item_Index[CALIBRATE_RANGE] - 100) / 200;
return sig;

Hi Paulvvz,

thank you very much for your answer. :slight_smile: