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.

求ADS8325参考程序

Other Parts Discussed in Thread: ADS8326

基于MSP430的参考程序,谢谢

  • 楼主是哪里遇到问题了呢?

    ADS8326的程序,供参考:

    unsigned short Get8326Voltage()
    {
    unsigned short temp=0;
    unsigned char i;

    CLK_1;
    CS_0;
    CLK_0;
    CLK_1;
    CLK_0;
    CLK_1;
    CLK_0;
    CLK_1;
    CLK_0;
    CLK_1;
    CLK_0;

    CLK_1;

    for(i=0;i<16;i++)
    {
    temp<<=1;

    CLK_0;

    CLK_1;
    if(GET_DO)
    temp+=1;

    }
    CS_1;
    return temp;
    }


    unsigned short SPIGet8326Voltage()
    {
    unsigned short temp=0;
    unsigned short i;
    CS_1;
    CS_0;
    for(i=0;i<16;i++)
    {
    temp<<=1;
    CLK_0;
    CLK_1;
    temp+=GET_DO;
    }
    CS_1;
    return temp;
    }