MSP430f1232 ADC10 DTC Problem, Please Help?

Started by Rob Knudson February 25, 2008
Here is my code:

void main (void){
int *LED_VOLT; //LED Voltage
int *LED_AMP; //LED Current
int *LED_INT; //LED Intensity (Photo Diode)
int *LED_TEMP; //LED Temperature
int *LED_BUS; //BUS line Voltage
int *LED_THERM;
int temp;

//
// ADC Action
//
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
ADC10CTL1 = INCH_4 + CONSEQ_1 + ADC10DIV1; // A4,A3,A2,A1,A0, single sequence
ADC10CTL0 = REFON + REF2_5V + SREF_3 + ADC10SHT_2 + MSC + ADC10ON + ADC10IE;
ADC10DTC1 = 0x05; // 5 conversions
ADC10AE |= 0x1F; // P2.4,3,2,1,0 ADC10 option select
*LED_VOLT = 0x200;
*LED_AMP = 0x202;
*LED_THERM = 0x204;
*LED_INT = 0x206;
*LED_BUS = 0x208;
for(;;){
ADC10SA = 0x200; // Data buffer start
ADC10CTL0 &= ~ENC;
while (ADC10CTL1 & BUSY); // Wait if ADC10 core is active

ADC10CTL0 |= ENC + ADC10SC; // Sampling and conversion start
}
}
I can't seem to read from memory anything that makes sense, lots of 0x03FFs and so on. would like to read the results back from the ADC for the first 5 channels 0-4. I believe I have set this up according to the example code with few minor changes in order to read more channels. Can anyone see obvious mistakes? I'm relatively new to the 430, and have never used the ADC10 before.

Thanks,
Rob

Rob Knudson
Innovative Creations, L.L.C.
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping

Beginning Microcontrollers with the MSP430