LPC1768 ADC ISSUES
- http://gvworks.blogspot.gr/2011/03/lpc1768-adc-has-too-many-glitches.html
- http://forums.nxp.com/viewtopic.php?t=5575
- http://permalink.gmane.org/gmane.comp.hardware.arm.lpc2100/55416
- Bob Anderson AnalogInAnalyzer at mbed
- http://code.google.com/p/cortex-m3-tutorials/downloads/detail?name=ADC_glitch_remove.rar&can=2&q=
- http://www.digipedia.pl/usenet/thread/13010/13828/
I experimented by adding a capacitor from adc in to Vref- and 2.2nF ceramic 0805 close to the pins cure the problem. .... The circuit I suggested cured the problem. You can experiment with the R and C values but try starting with something like 100 ohms and 470pf.
<cpp> It has to be the software. I have the ADC in my LPC1766 measuring 8 CHs of voltages, and I get 0.05% accuracy or better every read consistently. I am measuring +5.0V, +12V, -12V, +48V through simple R dividers and 1 inverter opamp. My source impedances to the ADC vary from 500 to 5K Ohm. My Vref is nothing but a simple dual RC lowpass of 10Ohm/0.22uF from the 3.3V. Full Scale factor for each supply is set to about 3.0V (90%) of the 3.3Vref span. Nothing fancy at all.
The only variations I see are in the actually DC voltages, which the ADC accurately reflects.
I have even switched the ADC clk freq around, don't see much difference even then.
Now if I don't have the code setup right, I can get totally wild readings back from the ADC. I would suggest you try different ADC code and see what happens.
Perhaps the Pin I/O settings are not correct. Or there is something else wrong.
I really think the problem must be somewhere in your code. I've never had problems with ADCs in any NXP MCUs. It's not the chip.
Chris. </cpp>