How to convert the ADC result into the result with mV unit of MPC5744P?

cancel
Showing results for 
Search instead for 
Did you mean: 

How to convert the ADC result into the result with mV unit of MPC5744P?

Jump to solution
119 Views
nathan_
Contributor IV

I want to use the ADC module of MPC5744P.

The reult from the ADC channel has been got, as the following code:

Result[0] = ADC_1.CDR[5].B.CDATA; //Read ADC1_AN6 conversion result data

I want to convert the Result[0] into the result with mV unit.

How to convert that?

I saw some example, the convertion is as follows:

ResultInMv[0] = (uint16_t) (ADC_VREF*Result[0]/0xFFF); /* Conversion in mv */

Is it correct?

Thank you.

1 Solution
40 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Yes, it is. Supposing ADC_VREF is in mV i.e. 5000/3300

View solution in original post

2 Replies
41 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Yes, it is. Supposing ADC_VREF is in mV i.e. 5000/3300

View solution in original post

40 Views
nathan_
Contributor IV

I think I have figure it out. But I have one problem to confirm.

The pin 50 and pin 56 of MPC5744P are VDD_HV_ADRE0 and VDD_HV_ADRE1.

In my board, the volt to the two pins are 2.5V.

my problem is: should I change the ADC_VREF to 2500 as the volt to the two pins are 2.5V?

0 Kudos