P6SEL |= 0x03; //A/D通道A0、A1使能,P6.2/A2,P6.3/A3 ADC12CTL0 = ADC12ON+MSC+SHT0_2+REFON+REF2_5V;
//开启并设置ADC12,多次连续采样,采样保持时间16个ADC12CLK周期
//These bits define the number of ADC12CLK cycles in
//the sampling period for registers ADC12MEM0 to ADC12MEM7.
ADC12CTL1 = SHP+CONSEQ_3+ADC12SSEL_1;
//使用低频输出时钟,32.768KHz,Repeat-sequence-of-channels
ADC12MCTL0 = INCH_0+SREF_1;
//Channel A0,静态压力值,AVREF
ADC12MCTL1 = INCH_1+SREF_0+EOS;
//Channel A1,脉搏波,AVCC
//ADC12IE = 0x02; //A1中断使能 //等待参考电压启动
ADC12CTL0 |= ENC; //开启转换
ADC12CTL0 |= ADC12SC; //使能转换