AnsweredAssumed Answered

Converting ADC value to milivolts in MM9Z1J638

Question asked by kadir uzun on Jul 18, 2016
Latest reply on Aug 2, 2016 by kadir uzun

Hello All,


I am studying on MM9Z1J638 intelligent battery sensor. I see that ADC results of voltage difference within each cell is kept in mV as well among with adc values (called raw values in demo code). I did not quite get how ADC result (raw values) are converted into miliVolts.



const u8 Vres    [V_MAX_CHANNELS] = {VS_RES_0mV25, VS_RES_0mV25, VS_RES_0mV5,   VS_RES_1mV};


Following shows this conversion:


Vsense[u8VChIdx].u16Raw = u16VsenseValue;

Vsense[u8VChIdx].u16mV = u16VsenseValue >> Vsense[u8VChIdx].u8Res;


Looking forward to see your comments.