Electronic – MSP430 ADC least significant bits always 1

adcanalogmicrocontrollermsp430

I have an MSP430F2618 with built in 12-bit ADC, but for some reason the values it returns always end with the 2 least significant bits set to 1, except when it zeroes out. In other words, the counts are always of the form 0x##3, 0x##7, 0x##B, or 0x##F. Am I missing something in my initialization that magically turns my 12bit ADC into a 10bit? Could there be some transient voltage that just happens to always saturate the sampling circuit for the least significant bits? Any suggestions?

  P6SEL |= 0x01;                            // P6.0,P6.1-ADC option select
  ADC12CTL0 = SHT0_8 + ADC12ON + MSC;       // Set sampling time, turn on ADC12 (256 ADC12CLK cycles, ADCON, Multiple sample and conversion)
  ADC12CTL1 = SHP + CONSEQ_1;                 // Use sampling timer (SAMPCON signal is sourced from the sampling timer, Sequence-of-channels conversion sequence mode)
  ADC12MCTL0 = SREF_6 + INCH_0 + EOS;             //inch (Input channel) assigns channel to this memory location, (Reference: VR+ =VeREF+ and VR- = VREF-), end of sequence
  ADC12IE = 0x01;                           // Enable interrupt
  ADC12CTL0 |= ENC;                         // Conversion enabled

Best Answer

Oli was right. I had no caps on my VRef and the supply wasn't able to source 200uA of transient current for the last 2 bits of conversion.

Adding 10uF across VRef+ and VRef- solved the problem.