ADC intput pin's voltage changed

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

ADC intput pin's voltage changed

ソリューションへジャンプ
516件の閲覧回数
Kaitochi
Contributor I

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);
}

0 件の賞賛
1 解決策
458件の閲覧回数
frank_m
Senior Contributor III

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.

 

元の投稿で解決策を見る

0 件の賞賛
5 返答(返信)
471件の閲覧回数
Kaitochi
Contributor I

It is connected. I'm reading 3 channels 8, 9, 10 of ADC0. If 2 channels 9, 10 are not connected to the board, channel 8 channel 8 reads the correct result

0 件の賞賛
459件の閲覧回数
frank_m
Senior Contributor III

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.

 

0 件の賞賛
453件の閲覧回数
Kaitochi
Contributor I

Thanks for your support. I have combined both ways and it works fine

0 件の賞賛
464件の閲覧回数
scottm
Senior Contributor II

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?

0 件の賞賛
479件の閲覧回数
scottm
Senior Contributor II

Is this happening with nothing connected?

If the pin defaults to output mode as a GPIO then I'd expect the voltage to change once you switch the pin to ADC input mode.

Scott

0 件の賞賛