Hi there,
I am trying to use the ADC12 on an MSP430F2619 to measure two different input voltages constantly, on channels A0 and A1, storing these values in ADC12MEM0 and ADC12MEM1. But I suspect that I have initialized something incorrectly, because when I test this (using the on-chip debugger in CCSv5.1), I find that the values are affecting each other. The A0 value is typically around 0x900 (from a sensor), but when the A1 channel voltage decreases (as seen in ADC12MEM1 and measured by a multimeter), so does the A0 channel measurement (in ADC12MEM0) to around 0x500, despite A0 having not changed voltage.
It doesn't seem right to me that the measurement for channel A0 should be a different value based on the channel A1 input, since A0 always is getting the same voltage. What am I doing wrong?
My initialization is as follows, the program then runs in an infinite loop and (for now) I am pausing the debugger to measure values in ADC12MEM0 and ADC12MEM1
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
P6SEL |= 0x03; // Enable A/D channel A0 and A1
ADC12CTL0 = ADC12ON+MSC+SHT0_8; // Turn on ADC12, set sampling time
ADC12CTL1 = SHP+CONSEQ_3; // Use sampling timer, set mode
ADC12MCTL0 = INCH_0; // ref+=AVcc, channel = A0
ADC12MCTL1 = INCH_1 + EOS; // ref+=AVcc, channel = A1
ADC12CTL0 |= ENC; // Enable conversions
ADC12CTL0 |= ADC12SC; // Start conversion
I suspect that there is some sort of averaging going on when the values are stored in the MEM registers, but I'm not sure how I should go about measuring these voltages independently.
Thank you in advance!