Reg ADC to voltage conversion

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Reg ADC to voltage conversion

570 Views
vignesh_v
Contributor III

Can anyone help me out how to convert ADC result in FIFO to voltage assume my ref is 5V and input Vin is 2.5 V. ADC resolution is 12 bit. say im reading a single channel ANA23.

. I saw the example couldnt understandit. kindly guide me.

Labels (1)
3 Replies

493 Views
vignesh_v
Contributor III

Hi Thanks,

          Ya i meant eQADC of MPC5777c. Please tell me if i give 2.5V as input 5V reference based on the equation how can i manipulate it and check whether i got back what input i gave. for diagnostic purposes i need to perform this .

The question might be trivial but i just need to check whether my understanding is right. 

Thanks In Advance

0 Kudos

493 Views
PetrS
NXP TechSupport
NXP TechSupport

theoretically you should get value 0x2000

pastedImage_1.png

BR, Petr

493 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

you did not specify the MCU, but I guess you meant eQADC of MPC5777C.

If yes, then refer to table Table 30-134 of the device Reference Manual. It gives correspondence between analog voltages and digital values. From this you can see that for max input value the result in RFIFO is 0x3FFC.

So for your 5V reference the equation for input voltage in mV is

inp_mV = 5000 * RFIFO value / 0x3FFC

BR, Petr

0 Kudos