最近写了一个ad的小程序,中断的。可是运行的时候总是进了中断就出不来了。怎么回事呢?
void Init_ADC12(void)
{
P6SEL |= 0x80; // Enable A/D Input channel A7
ADC12CTL0 = SHT0_8 + REFON + ADC12ON + REF2_5V;
ADC12CTL1 = SHP+CONSEQ_1;
ADC12MCTL1 = SREF_1 + INCH_7
ADC12IE = 0x01;
ADC12CTL0 |= ENC;
}
#pragma vector=ADC12_VECTOR
__interrupt void ADC12ISR (void)
{
value[0]= ADC12MEM1;
ADC12CTL0 &= ~(ENC+ADC12SC);
} |