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.

ADS7886

Other Parts Discussed in Thread: ADS7886

请问一下,我的ADS7886读数一直为0,连线如上,刚开始加了上拉电阻后来去掉了。代码如下

unsigned int get_data()
{
    unsigned char i,dat;

    dat = 0;
    CS_1;
    CLK_1;
    delay();
    CS_0;
    delay();
    for(i = 0; i < 15; i++)
    {
        CLK_0;
        delay();
        dat <<= 1;
        if(DIN)
              dat |= 0x01;
        CLK_1;
        delay();
    }
    CS_1;
    delay();
    return dat;
}

一直没解决,求大神帮助!谢谢了