void Init_ADC_seq(void)
{
P6SEL = 0x0F; // Enable A/D channel A0A1A2A3
ADC12CTL0 = ADC12ON+ADC12MSC+ADC12SHT0_8;
ADC12CTL1 = ADC12SHP+ADC12CONSEQ_1+ADC12SSEL1 ; // Use sampling timer, single sequence // ADCCLK=MCLK,NO DIV ADC12CTL2 = ADC12RES_0; //8位的分辨率
ADC12MCTL0 = ADC12INCH_0; // ref+=AVcc, channel = A0
ADC12MCTL1 = ADC12INCH_1; // ref+=AVcc, channel = A1
ADC12MCTL2 = ADC12INCH_2; // ref+=AVcc, channel = A2
ADC12MCTL3 = ADC12INCH_3+ADC12EOS; // ref+=AVcc, channel = A3, end seq.
ADC12IE = 0x08; // Enable ADC12IFG.3
ADC12CTL0 |= ADC12ENC; // Enable conversions
}
可以跑32M,参考电压是AVCC 3.3V,AGND; 这配置,在我将ADC12转换分辨率设为12位时,是没有这现象的。
[ 本帖最后由 shushu 于 2012-2-21 10:34 编辑 ] |