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.

IO口模拟 IIC 读取 BQ20Z95读取电量信息 这样的方法对吗?



       这个程序  能读到 数据 但是 不知道为什么 每次都出来的都不太一样 有时是实际的一半 有时 又莫名的出现了一个 0X17 难道是时    BQ20Z95 再向M3 写数据也会先给个0X17 写数据吗  打个比方 我现在电量是100  有时收到的数据是0X64 有时收到的是 0X32  有的时候 会是0X17  求大神指导下 我的问题 到底在哪儿。我邮箱:wujc@gwsoft.com.cn  MR_WU

         IIC_Start();  
        IIC_Send_Byte(0X16|0x00);//»       
        IIC_Ack();
        IIC_Send_Byte(0X0e);
        IIC_Ack();    
        IIC_Start();
        IIC_Send_Byte(0X16|0x01);
        IIC_Ack();
        buf[0]=IIC_Read_Byte();
        IIC_Stop();