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.

ADS1211: 1211通道切换问题

Part Number: ADS1211

ti的工程师,你好,我在使用1211的时候,遇到通道切换的问题,手册上P21说明,改变通道后,要等到第四个ready信号有效时,

有效转换的数据才能输出到SDOUT信号线,我的程序读到的数据读到的数据始终是第一个通道的数据,请问为什么,如果我要轮询每个通道的结果,应该怎样操作?
附上ready信号的中断处理程序,请各位指点一下:
void ADC_GPIO_IRQHandler(void)
{
    if (cur_channl != last_channel
    {
        select_adc_channel(SPI2cur_channl); ///<通过写命令寄存器更改通道
        adc1121_channel_change_flag = 1;
        last_channel = cur_channl;
        adc1121_ready_times = 0;
    }
    else
    {
        if(adc1121_channel_change_flag == 1)
        {
            // 手册上P21说明,改变通道后,要等到第四个ready信号有效时,
            //  有效转换的数据才能输出到SDOUT信号线
            if(adc1121_ready_times >= 4)
            {
                clear_adc_channel_change_flag();
                adc1121_ready_times = 0;
                ads1121_read_data(cur_channl);
            }else {
                adc1121_ready_times++;
            }
        }
        else 
        {
            ads1121_read_data(cur_channl);
        }
  
    }                
}
  • 您好,

    是的,ADS1211改变通道后,需要等第四个ready信号输出数据才有效。抱歉,我们无法帮您验证您的中断处理程序,您现在改变通道后,用示波器实测第4个ready信号数据数据是正确的吗?以验证您是否正确修改了寄存器实现了通道改变。