Reply by Joe Radomski November 17, 20062006-11-17
This is the first time I'm using the ADC10.. In the past all my projects have used the adc12..

I am using the following code to set up the ADC.. I need it to continually sample to a buffer.. In the adc interrupt I am reading and averaging the data then storing into another array.. The problem is, that I'm not getting any conversions.. Any ideas?? Here is my code to set up the adc. according to the datasheet, with adc10ct set, I dont believe I have to touch adc10sa to continue conversions.

void InitADC(void)
{
// initialize the a/d
// ADC10CTL1 = INCH_4 + CONSEQ_3 + ADC10DIV_7; // A4/A3/A2/A1/A0, multi sequence
ADC10CTL1 = INCH_5 + CONSEQ_3 + ADC10DIV_7; // a5/A4/A3/A2/A1/A0,

ADC10CTL0 = SREF_1 + REFON + REF2_5V + ADC10SHT_2 + ADC10SR + MSC + ADC10ON + ADC10IE; //int ref, 16x
//up to 50ksps , multi sample, adc10=on, interrupt enabled
// rate = adcosc/(16+13)

ADC10DTC0 = ADC10CT; // continuous conversions
ADC10DTC1 = 0x04; // 4 conversions
// 4 * 2 *6 = 48 bytes
ADC10AE |= 0x1f; // P2.4,3,2,1,0 ADC10 option select
// ADC10AE |= 0x3f; // p3.0, P2.4,3,2,1,0 ADC10 option select

ADC10CTL0 &= ~ENC; //disable conversions
while (ADC10CTL1 & BUSY); // Wait if ADC10 core is active
ADC10SA = (UINT) &ASamples; // Data buffer start

ADC10CTL0 |= ENC + ADC10SC; // Sampling and conversion ready
ENABLE_AMPS = TRUE; // enable amplifiers

}

Beginning Microcontrollers with the MSP430