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.

ADC12一句指令的含义



while (!(ADC12IFG & BIT0)); 这段指令常被写在ADC12CTL0 |= ADC12SC; 之后,ADC12IFG 和BIT0分别是什么意思呢?

  •  你好,ADC12IFG 是 ADC12模块中的一个中断标志位寄存器,描述可以在users guide中找到,如下,

    ADC12IFG是一个16位寄存器,BIT0 指的是最低位 ADC12IFG0。

    while (!(ADC12IFG & BIT0)); 这句话的意思是,等待通道0的ADC转换,如果转换完成,通道0中断标志位置位(ADC12IFG0=1),那么程序继续往下执行。