Hi NXP,
I'm using ADC in LPC54102J512 microcontroller. After executing the function ADC_DoSelfCalibration() specifically this command line: base->STARTUP = ADC_STARTUP_ADC_ENA_MASK; tthen my ADC input pin's voltage changed from 1.7V to 3.5V. How to solve this problem. Here is my code config ADC:
static void ADC0_init(void) {
/* Perform self calibration */
ADC_DoSelfCalibration(ADC0_PERIPHERAL);
/* Initialize ADC0 peripheral */
ADC_Init(ADC0_PERIPHERAL, &ADC0configStruct);
/* Configure the conversion sequence A */
ADC_SetConvSeqAConfig(ADC0_PERIPHERAL, &ADC0ConvSeqAConfigStruct);
/* Enable the conversion sequence A */
ADC_EnableConvSeqA(ADC0_PERIPHERAL, true);
/* Configure threshold compare interrupt on channel 10 */
ADC_EnableThresholdCompareInterrupt(ADC0_PERIPHERAL, 8U, kADC_ThresholdInterruptDisabled);
ADC_EnableThresholdCompareInterrupt(ADC0_PERIPHERAL, 9U, kADC_ThresholdInterruptDisabled);
ADC_EnableThresholdCompareInterrupt(ADC0_PERIPHERAL, 10U, kADC_ThresholdInterruptDisabled);
}
已解决! 转到解答。
You must provide either a low enough input impedance at your ADC inputs, or increase sampling time / inner-sample delays.
All ADC inputs configured for a conversion sequence are connected to the same internal Sample&Hold capacitor in rapid succession (and then converted). If the input does not provide enough current to charge/discharge this S&H capacitor in the specified time, you get exactly this channel "crosstalk" effect.
You can view the ADC as a simple RC element in this regard.
You must provide either a low enough input impedance at your ADC inputs, or increase sampling time / inner-sample delays.
All ADC inputs configured for a conversion sequence are connected to the same internal Sample&Hold capacitor in rapid succession (and then converted). If the input does not provide enough current to charge/discharge this S&H capacitor in the specified time, you get exactly this channel "crosstalk" effect.
You can view the ADC as a simple RC element in this regard.
I haven't used the comparator function myself so I can't speak to that. When you say the voltage changes after starting the ADC, do you mean that the voltage measured externally (with a voltmeter or oscilloscope) is changing? What is the source impedance for the signal?