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.

ADS127L01采样数据不准确,可能是时序问题?

Other Parts Discussed in Thread: ADS127L01

这是我写的使用模拟SPI读取ADS127L01数据的程序,有使用过的大神可以帮忙解答一下吗?能否提供一下参考程序?

SET_START_ADS127L01; //拉高START引脚

while(READ_READY_ADS127L01() != 0) //默认高电平
{

}

CLR_CS_ADS127L01; //拉低片选信号

for(i = 0; i < 3; i++) // 循环读三个字节
{
for(j = 0; j < 8; j++)
{
pbuf[i] <<= 1;

SET_SCLK_ADS127L01; //拉高时钟
SET_SCLK_ADS127L01;

CLR_SCLK_ADS127L01; //拉低时钟
CLR_SCLK_ADS127L01;

pbuf[i] |= READ_SDO_ADS127L01(); //读取SDO的信号
}
}

DelayNus(1);

SET_CS_ADS127L01; //拉高片选
CLR_START_ADS127L01; //拉低START引脚