我现在测试的ADS1247写入数据寄存器的数据读出验证是正确的,但是配置的1mA电流无法在AIN0输出,采集的数据寄存器中的数据也不正常,数据位0xFF8000-0X000000。请问以上是什么原因造成的?
下面是我对寄存器的配置
ADS1247_CS_CLR();
ADS1247_RESET_SET()
ADS1247_Delays(20);
WriteByteADS1247(Reset);//0x06
ADS1247_Delays(1000);//6ms
WriteByteADS1247(WReg|Reg_MUX0);
WriteByteADS1247(0x00);
WriteByteADS1247(ADS1247_MUX0);//0x01
WriteByteADS1247(WReg|Reg_VBias);
WriteByteADS1247(0x00);
WriteByteADS1247(ADS1247_VBias);//0x00
WriteByteADS1247(WReg|Reg_MUX1);
WriteByteADS1247(0x00);
WriteByteADS1247(ADS1247_MUX1);//0x00
WriteByteADS1247(WReg|Reg_SYS0);
WriteByteADS1247(0x00);
WriteByteADS1247(ADS1247_SYS0);//0x00
WriteByteADS1247(WReg|Reg_IDAC0);
WriteByteADS1247(0x00);
WriteByteADS1247(ADS1247_IDAC0);//0x06
WriteByteADS1247(WReg|Reg_IDAC1);
WriteByteADS1247(0x00);
WriteByteADS1247(ADS1247_IDAC1);//0x0f
WriteByteADS1247(RReg|Reg_IDAC1);
WriteByteADS1247(0x00);
k = ReadByteADS1247();//这里读出的数据是0x0f验证写入寄存器的数据正常
WriteByteADS1247(0x12);
// ADS1247_CS_SET();
ADS1247_START_SET();
下面是读数据
while(ADS1247_DOut_Get());
WriteByteADS1247(0x12);
temp24 = ReadDWordADS1247();
读出的数据就是0xff8000或者0x000000,请问配置有问题吗?问题出在那里?
有事情给我发 163邮件就ok的
0