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.

求助大神帮助ADS1115数据转化问题

Other Parts Discussed in Thread: ADS1115

我用ADS1115结果采样出来的只有65536,请问这是怎么回事啊?(给参考电压3.3v,电压基准4.096V,选择通道AIN1),


这是配置
  chan[0] = 0x90;       //写入主机地址

  chan[1] = 0x01;       //指向配置寄存器

  chan[2] = 0xc2;   //confige register 默认通道 ,AINp=AIN0,AINn=GND                     

  chan[3] = 0xd4;       //低字节地址,ADS1115为下降沿单次模式,转换速率为128SPS,比较器关闭



数据采集


result_h = readbyte_IIC();

  result_l = readbyte_IIC();

  delay(1);

  stop_IIC();

  result = (result_h<<8)|result_l;

  //if(result>0x7fff)

  // result=~result+1;//用于测量负电压,负电压范围8000~ffff,负电压与正电压关于0有类似对称关系,按位取反后+1相同


这里采集到的result一直是65536,该怎么办啊?我用这个公式再讲result值计算出来显示

volue = sum/32768*3.3;  volue就计算显示数据了,不知道对不对,麻烦各位大神帮我看看吧,先谢谢了~!!!!