Sigma Delta ADC scaling issue

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

Sigma Delta ADC scaling issue

532 Views
jyothsnarajan
Contributor V

HI,

I want to exercise the SDADC on the MPC5746. I use the following configuration parameters :

SDADC_0.MCR.B.MODE = 1;         /* Single ended input */

SDADC_0.MCR.B.VCOMSEL= 0;   /* IMP+ = AN[0]; INP- = VREFN */

SDADC_0.MCR.B.HPFEN = 0;       /* Disable HP filter */

SDADC_0.CSR.B.BIASEN = 0       /* Disable bias */

SDADC_0.MCR.B.PGAN = 0;         /* 000: gain = 1 */

SDADC_0.MCR.B.PDR = 0;           /* 0: OSR = 24; output data rate = sampleClk/(2*OSR) */

Since SDADC is 16 bit, and VREF is 5V, to convert from sample value to Voltage i use the equation:

         Value-in-mV = (register_value * 5000 )/ 0xFFFF; 

When i execute the program, the values I get half of the expected values. I probed the pins but find the actual values are correct, so I do not suspect any hardware issue.

Something in the SDADC configuration appears to be causing this divide by 2.  

Appreciate any suggestions. 

Tags (2)
0 Kudos
1 Reply

388 Views
tamtran
NXP Employee
NXP Employee

Hi,

SDADC has sign 16 bit resolution, the MSB bit is sign bit, so your equation must be: Value-in-mV = (register_value * 5000 )/ (2 ^ 15);

0 Kudos