Average = 0;
for(i = 0; i < 32; i++) //这里为什么是32?难道是单通道多次转换32次把ADC10MNM存满退出?ADC10MNM多少满?
Average += Results;
Average >>= 5; //除以32求平均值
Average=(Average*35)/1023;
if (Average>30) //给的电压过高,LED6亮
P1OUT|=BIT6;
else P1OUT&=~BIT6;
index = 0;
_BIC_SR_IRQ(LPM0_bits); // Clear LPM0
}
}