void initial_adc10()
{
//P1SEL|=BIT5;
ADC10CTL0|=ADC10SHT_2+ADC10ON+ADC10IE+MSC;//增大采样时间以保证采样的准确性;取参考电压VCC,AD内核上电,使采样时间为16xADC10CLK,
ADC10CTL1|=INCH_5+CONSEQ_2;
ADC10AE0|= BIT5;
}
void start()
{
ADC10CTL0|=ADC10SC+ENC;
}
当执行完ADC10CTL0|=ADC10SC+ENC;后,p1.5口的电压就变成了2v,这是为什么? |