I seem to be getting a large offset from the ADC on the LPC824.
I have the LPCXpresso824 eval board (OM13071) and I shorted the ADC input to GND. I am using the default LPCopen ADC demo code. The output of the ADC is 0x02C, which is about 35mV [(3.3/4096)*44]. I have verified this on several different demo boards - all having an output value when the input is grounded.
I have verified that the calibration is being performed and have verified that the initialization and operation of the LPCopen code follows the users manual.
Am I doing something wrong or missing something that the ADC does not output zero when the input is grounded?
Thank you,
Kris
In my case, I can duplicate the offset and then solve that.
I config I/O from PULL-UP to INACTIVE,
since PULL-UP is default setting in Pins configuration tool.
IOCON_PIO_MODE(PIO0_14_MODE_PULL_UP) -> IOCON_PIO_MODE(PIO0_14_MODE_INACTIVE)
IDE: MCUXPRESSO V11.2.1
We are experiencing the same 35mV offset problem on our project. Same offset on all channels in use. Same offset across different boards. Adding the code that Simon suggested did NOT solve the problem. Looks like a consistent +35mV offset at all input voltages from 0V on up.
We are using a 3.3V reference made by a precision reference supply.
NXP - What is the story with this issue? Did the “deep research” by Kerry Zhou reach any conclusions?
Doug
Hi Kris,
Please tell me the lpcopen version and the IDE you are using, I will do the deep research on my side.
Have a great day,
kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Kerry,
it would be great to test ADC on LPC824, me and some of my friends had problem with ADC linearity of ADC on LPC824.
Just try to connect some power source and measure values from 0 to VCC and put them into the graph - value from power source, value from LPC824. Above 1/2 range, there is huge problem with ADC. I tried to ask here https://community.nxp.com/thread/421806 But there was no response.
Thanks
Hi Vojtech and Kris,
Thanks for you to point out this question.
I have test the newest lpcopen adc code on my LPC824, I already reproduce the problem when I input 0v.
I will do the deep research, and will let you know if I have any updated information.
Please wait patiently.
Best Regards,
Kerry
Hi,
any update on this. Got the same issue on my latest project. Looks like the ADC on the 824 is basically unusable.
I do note that figure 38 in the data sheet it seems that ADC inputs 1..11 are connected via 250 ohm to 2.5K R to ADC0 - is that really true?
Anyway, pull up resistance seems to be about 66k for me.
So - is the LPC824 not fit for purpose ?
Thanks
Simon
Had a thought today - just tried it out...
Add the following three lines:
Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_IOCON);
Chip_IOCON_PinSetMode(LPC_IOCON, IOCON_PIO23, PIN_MODE_INACTIVE);
Chip_Clock_DisablePeriphClock(SYSCTL_CLOCK_IOCON);
Makes a big difference for me ;-) [obviously adjust the IOCON pin as needed]
On a very quick test my readings from 0 to 2818 (of 4096) are to within better than 1% as far as my DVM shows (and that includes the measured voltage going through a voltage divider.
Hope that helps!
S.
Hi Kerry,
I am using MCUXpresso V10.1.1.1 and LPCopen Version 2_19 (the version included with the MCUXpreso install).
Thank you,
Kris