//这里以前错了注成了解8 * ADC10CLKs
ADC10CTL1 = INCH_1; // input A1,ADC1作为输入
ADC10AE0 |= 0x02; // PA.1 ADC option select
P1DIR |= 0x01; // Set P1.0 to output direction
for (;;)
{
ADC10CTL0 |= ENC + ADC10SC; // Sampling and conversion start
if (ADC10MEM < 0x1FF)
P1OUT &= ~0x01; // Clear P1.0 LED off
else
P1OUT |= 0x01; // Set P1.0 LED on
}
}