#pragma vector=ADC_VECTOR
__interrupt void ADC12ISR (void)
{
static uchar index = 0;
results[index++] = ADC12MEM1; // Move results
if(index == Num_of_Results)
{
uchar i;
average = 0;
for(i = 0; i < Num_of_Results; i++)
{
average += results;
}
average >>= 5; //除以32
index = 0;
tcnt++;
if(tcnt == 250) //主要是降低串口发送速度
{
LPM1_EXIT;
tcnt = 0;
}
}
}
Error[Pe065]: expected a ";" F:\MSP430\最终\main.c 185
Warning[Pe012]: parsing restarts here after previous syntax error F:\MSP430\最终\main.c 207 |