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.

ADS8862

Other Parts Discussed in Thread: ADS8862

我用cc2530SPI驱动ADS8862读取它采集到的值,确定已经驱动成功了也能采集到值,但不知道为什么那个值一直在那变化而且还很大的那种,ADS8862采集的模拟信号的变化应该是很微小的,这应该不是驱动程序的问题吧?

 SPI1_CS = 0;

U0DBUF = 0x00;
while(!(U0CSR & 0x02));
U0CSR &= 0xFD;

void readdata(void)

{

U0DBUF = 0xff;
while(!(U0CSR & 0x02));
U0CSR &= 0xFD;

SPI1_CS = 1;

for(uint8 i = 0; i < 2; i++)
{
U0DBUF = 0x00;
while(!(U0CSR & 0x02));
U0CSR &= 0xFD;
BufferData[i] = U0DBUF;
}

 SPI1_CS = 0;

}

这程序应该没问题吧,寄存器已经初始化好了,就不放上来了。SPI1_CS = 1后面用不用继续通过MOSI给ADS8862发送数据,给它留出足够的转换时间?(不过这我也试了,也没用)望大佬指点!谢谢!