I have p3.0 (channel 1) and p3.2 (channel 2) setup as two analog input.
Using a variable resistor, I change the input on channel 1 with nothing connected on channel 2.
As the the value of channel 1 changes, channel 2 value seems to change proportionally. What's causing channel 2 to change when there's nothing connected? Ch 2 is externally pulled low with a 4.7k resistor.
//ADC SETUP
/////////////////////////////ADC Initialization/////////////
ADC10CTL0 = ADC10SHT_10 + ADC10ON; // 16ADCclks, ADC on
ADC10CTL1 = ADC10SHS_0 + ADC10CONSEQ_0 + ADC10SSEL_0; // bit trigger,MOD CLOCK SOURCE
ADC10CTL1 |= ADC10SHP; //pulse-mode select. sampcon signal sourced from sampling timer
ADC10CTL2 = ADC10RES; // 10-bits of resolution
ADC10MCTL0 = ADC10SREF_1; //
//ADC pin select for A1 and A2
P3SEL1 |= BIT0 + BIT2;
P3SEL0 |= BIT0 + BIT2;
P2SEL1 |= BIT4;
P2SEL0 |= BIT4;
while (1){
ADC10MCTL0 |= ADC10INCH_12;//selects channel 12
__delay_cycles(50000);
channelcase=5;
ADC10CTL0 |=ADC10ENC+ ADC10SC; // Sampling and conversion start for ADC
while (ADC10CTL1 & ADC10BUSY); // Wait if ADC10 core is active
ADC10CTL0 &=~ADC10ENC;
ADC10MCTL0 &= ~ ADC10INCH_15;
ADC10MCTL0 |= ADC10INCH_14;//selects channel 14
_delay_cycles(50000);
channelcase=6;
ADC10CTL0 |=ADC10ENC+ ADC10SC; // Sampling and conversion start for ADC
while (ADC10CTL1 & ADC10BUSY);
ADC10CTL0 &=~ADC10ENC;
ADC10MCTL0 &= ~ ADC10INCH_15;
//__delay_cycles(5000);
}//end of while loop