HSADC on LPC4370 question

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

HSADC on LPC4370 question

550 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by JohnR on Wed Apr 23 18:15:30 MST 2014
hi All,

What are the settings to allow the 12-bit HSADC in LPC4370 to generate a 0 - 4095 straight binary output for a unipolar input on, say ADCHS_0, from an input voltage of 0 to 1.2 volts approx.

At the present I have grounded ADCHS_NEG and tried different combinations of the DCINNEG and DCINPOS settings but I seem to get only half of the range.

For instance, with DCINNEG and DCINPOS both equal to HSADC_CHANNEL_NODCBIAS (0) and TWOS set to offset binary, an input range of 0.05 to .40 volts gives output values from 2148 to 3840 counts.

I think I may have to remove the ground on ADCHS_NEG so it floats and set DCINNEG = 1.

Could someone let me know that this is right.

Thanks in advance,

JohnR
Labels (1)
0 Kudos
2 Replies

402 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by SHUICHI SANO on Wed Apr 13 23:32:58 MST 2016
Hello John,
I'm having same issue here, and cannot figure out.

Could you explain what you are doing with this?

Chip_HSADC_SetACDCBias(LPC_ADCHS, 0, HSADC_CHANNEL_DCBIAS, HSADC_CHANNEL_NODCBIAS);
Sano
0 Kudos

402 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by JohnR on Thu Apr 24 06:31:17 MST 2014
Hi All,

I guess I have answered my own question. With some trepidation I cut the trace that grounded the ADCHS_NEG pin and set the bias as follows:

Chip_HSADC_SetACDCBias(LPC_ADCHS, 0, HSADC_CHANNEL_DCBIAS, HSADC_CHANNEL_NODCBIAS);

Now I get the expected output 100 - 4095 for an input range from 0.1 to 0.88 volts approximately. Plotting in Excel gives

        y = 5114.4x - 438.36    R² = 0.9995

JohnR.


0 Kudos