ADC12CTL0 |= ADC12ON + SHT0_2 + REF2_5V + REFON ; //采样保持时间为16个ADC12CLK
/*ADC12ON ADC模块电源控制位;
REF2_5V 内部参考电压选择位0:1.5V 1:2.5V
REFON 参考电压模块控制位0:关闭 1:打开*/
ADC12CTL1 |= ADC12SSEL0 + ADC12SSEL1 ; //ADC12时钟源选择控制位 00ADC12OSC 01ACLK 10MCLK 11SMCLK
ADC12MCTL0 = 0x10; // 连续转换结束通道,CHANNEL = A0 参考选择控制位
ADC12IE |= 0x01; //使能A/D转换器
ADC12CTL0 |= ENC ; //AD转换使能 |