This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430F55xx_adc_07示例程序的几点疑问



先在附件中添加这一文件,以下是几点问题:

1.整段程序中没有读到ADC12CLK选的是哪个时钟源?是怎么看出来的?通过示波器读出来的值差不多是33KHz

2.这样未设定参考电压的程序中,他有满格电压吗?我测试的时候添加了如下代码:

  

#pragma vector=ADC12_VECTOR
__interrupt void ADC12ISR (void)
{
static unsigned char index = 0;

switch(__even_in_range(ADC12IV,34))
{
case 0: break;       // Vector 0: No interrupt
case 2: break;       // Vector 2: ADC overflow
case 4: break;       // Vector 4: ADC timing overflow
case 6:                   // Vector 6: ADC12IFG0
       results[index] = ADC12MEM0;          
       index++;                                                
       if(results[index] > 0x7ff)
              P1OUT |= BIT1;
       else
              P1OUT &= ~BIT1;
       if (index == 8)
       {
              index = 0;
       }

......

}

结果测试灯忽明忽暗,他是怎么判断的呢?

Thanks