出现这种一般的I2C问题有几个原因:
- STC3115电源电压过低(必须有VCC> 2.7V)
- I2C从器件地址不正确。因此,燃气表不响应另一个地址。
正确的地址是:
#define STC3115_SLAVE_ADDRESS_7BIT 0x70
#define STC3115_SLAVE_ADDRESS_8BIT 0xE0
- 不遵守I2C规范的建立时间和保持时间。
如果违反I2C时序,器件将不会解码I2C信号。
检查I2C的数据表要求约束。
- 两个I2C信号(SCL和SDA)的上升沿和下降沿同时发生,两者之间没有延迟。
这违反了I2C时序。因此STC3115可能会错过一个上升沿。
调整I2C主设备的信号,以在SCL和SDA信号的上升/下降沿之间获得小的延迟。
问候
以上来自于谷歌翻译
以下为原文
This general I2C issue can appear for several reasons:
- STC3115 power supply voltage is too low (must have VCC > 2.7V)
- The I2C Slave Address is not correct. Thus the gas gauge do not respond to another address.
The correct address is:
#define STC3115_SLAVE_ADDRESS_7BIT 0x70
#define STC3115_SLAVE_ADDRESS_8BIT 0xE0
- The Setup time and Hold time of I2C specification are not respected.
In case of violation the I2C timing, the device won't decode the I2C signal.
Check the datasheet requirement constrains for I2C.
- The rising edge and falling edge of both I2C signals (SCL and SDA) occur at the same time, without a delay in between.
This violate the I2C timing. Thus the STC3115 could miss one rising edge.
Adjust the signals of the I2C master device to get a small delay between both rising/falling edge of SCL and SDA signals.
Regards
出现这种一般的I2C问题有几个原因:
- STC3115电源电压过低(必须有VCC> 2.7V)
- I2C从器件地址不正确。因此,燃气表不响应另一个地址。
正确的地址是:
#define STC3115_SLAVE_ADDRESS_7BIT 0x70
#define STC3115_SLAVE_ADDRESS_8BIT 0xE0
- 不遵守I2C规范的建立时间和保持时间。
如果违反I2C时序,器件将不会解码I2C信号。
检查I2C的数据表要求约束。
- 两个I2C信号(SCL和SDA)的上升沿和下降沿同时发生,两者之间没有延迟。
这违反了I2C时序。因此STC3115可能会错过一个上升沿。
调整I2C主设备的信号,以在SCL和SDA信号的上升/下降沿之间获得小的延迟。
问候
以上来自于谷歌翻译
以下为原文
This general I2C issue can appear for several reasons:
- STC3115 power supply voltage is too low (must have VCC > 2.7V)
- The I2C Slave Address is not correct. Thus the gas gauge do not respond to another address.
The correct address is:
#define STC3115_SLAVE_ADDRESS_7BIT 0x70
#define STC3115_SLAVE_ADDRESS_8BIT 0xE0
- The Setup time and Hold time of I2C specification are not respected.
In case of violation the I2C timing, the device won't decode the I2C signal.
Check the datasheet requirement constrains for I2C.
- The rising edge and falling edge of both I2C signals (SCL and SDA) occur at the same time, without a delay in between.
This violate the I2C timing. Thus the STC3115 could miss one rising edge.
Adjust the signals of the I2C master device to get a small delay between both rising/falling edge of SCL and SDA signals.
Regards
举报