TI中文支持网
TI专业的中文技术问题搜集分享网站

ADS1248 读出来数据都是0

目前寄存器能读能写,但是读取数据,一直读出来为0,求解

Set_ADS1247_Chip_Enable(1);
Send_Data_SPI(WRITE_MUX0_REGISTER);
Send_Data_SPI(0x0e); //写入15个
Send_Data_SPI(0x2e); //MUX0 00101110 Send_Data_SPI(0);//VBIAS Send_Data_SPI(0x20);//MUX1 00100000 00110000
Send_Data_SPI(0x0f);//SYS0 00001111 Send_Data_SPI(0);//OFC0 Send_Data_SPI(0);//OFC1
Send_Data_SPI(0);//OFC2
Send_Data_SPI(0);//FSC0
Send_Data_SPI(0);//FSC1
Send_Data_SPI(0);//FSC2
Send_Data_SPI(0X0e);//IDAC0 00001110
Send_Data_SPI(((uint8_t)IDAC1_AIN4 + (uint8_t)IDAC2_AIN7)); //IDAC1 0x47
Send_Data_SPI(0);//GPIOCFG 0
Send_Data_SPI(0xff);//GPIODIR ff
Send_Data_SPI(0);//GPIODAT 00 Clear_ADS1247_Chip_Enable(1);

while(1)
{
Set_ADS1247_Chip_Enable(1);
while(DOUT1);
Send_Data_SPI(0x12);
DIN_ADS_1 ; tab[0] = Receive_Data_SPI(1);
tab[1] = Receive_Data_SPI(1);
tab[2] = Receive_Data_SPI(1); Receive_Data_SPI(1);
Clear_ADS1247_Chip_Enable(1);

mmuuss586:

用示波器看下,读写的时序是否合理;

赞(0)
未经允许不得转载:TI中文支持网 » ADS1248 读出来数据都是0
分享到: 更多 (0)