This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-F280025C: Universal_Motorcontrol_Lab : Add External Potentiometer

Part Number: LAUNCHXL-F280025C

Tool/software:

Hi,

I would like to add 3 external potentiometer into Universal Motorcontrol Lab, however it's weird when apply voltage on POT-1 but POT-2 ADC was affected !

3 external pot connected to 280025C
-------------------------------------------------
POT-1 connected to PIN-22 A12 / C1
POT-2 connected to PIN-29 A10 / C10
POT-3 connected to PIN-17 A5 / C2

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#define MTR1_POT-1_ADC_CH_NUM ADC_CH_ADCIN12 // ADCA-A12*/C1
#define MTR1_POT-2_ADC_CH_NUM ADC_CH_ADCIN10 // ADCA-A10*/C10
#define MTR1_POT-3_ADC_CH_NUM ADC_CH_ADCIN5 // ADCA-A5*/C2
#define MTR1_POT-1_ADC_CH_NUM ADC_SOC_NUMBER6 // ADCA-A12*/C1 -SOC6
#define MTR1_POT-2_ADC_CH_NUM ADC_SOC_NUMBER7 // ADCA-A10*/C10 -SOC7
#define MTR1_POT-3_ADC_CH_NUM ADC_SOC_NUMBER5 // ADCA-A5*/C2 -SOC7
void HAL_setupADCs(HAL_Handle handle)
{
.
.
ADC_setupSOC(MTR1_POT_ADC_BASE, MTR1_POT-1_ADC_SOC_NUM, MTR1_ADC_TRIGGER_SOC, MTR1_POT-1_ADC_CH_NUM, MTR1_ADC_V_SAMPLEWINDOW);
ADC_setupSOC(MTR1_POT_ADC_BASE, MTR1_POT-2_ADC_SOC_NUM, MTR1_ADC_TRIGGER_SOC, MTR1_POT-2_ADC_CH_NUM, MTR1_ADC_V_SAMPLEWINDOW);
ADC_setupSOC(MTR1_POT_ADC_BASE, MTR1_POT-3_ADC_SOC_NUM, MTR1_ADC_TRIGGER_SOC, MTR1_POT-3_ADC_CH_NUM, MTR1_ADC_V_SAMPLEWINDOW);
.
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

below is other example, based on example    adc_ex1_soc_software   when voltage applied to PIN-22 A12 (myADC0Result1), it's affect ADC on PIN-29 A10 (myADC0Result1),  at the end ~45 second, when applied 3.3v to PIN 29 A10 value changed to 4096, my question is why both A12 affect A10 ? 

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
void PinMux_init()
{ GPIO_setPinConfig(GPIO_230_GPIO230);
// AIO -> Analog mode selected
GPIO_setAnalogMode(230, GPIO_ANALOG_ENABLED);
GPIO_setPinConfig(GPIO_238_GPIO238);
// AIO -> Analog mode selected
GPIO_setAnalogMode(238, GPIO_ANALOG_ENABLED);
}
void ADC_init(){
myADC0_init();
myADC1_init();
}
void myADC0_init(){
ADC_setVREF(myADC0_BASE, ADC_REFERENCE_INTERNAL, ADC_REFERENCE_3_3V);
ADC_setPrescaler(myADC0_BASE, ADC_CLK_DIV_2_0);
ADC_setInterruptPulseMode(myADC0_BASE, ADC_PULSE_END_OF_CONV);
ADC_enableConverter(myADC0_BASE);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

can anyone help to point out any missing configuration or incorrect SOC number ? 

Tiger

  • Hi Tiger,

    When performing this test can you probe & check the voltage on the respective pins? do you see the voltage change on the effected pins change with the potentiometer?

    Can you try increasing the sample & hold time (ACQPS) of the ADC channels?

    Best,

    Kevin