This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

TWI_I2C_Error

main.cHi,

I am having an issue with I2C transaction in my program.

There are two sensors(Touch and Temp) connected to the I2C bus. Touch sensor is working well when I added Temp senor config, it started showing I2C error.

In my program line 407,408 are used to read Temp sensor. I am always getting error messages on these two line.

Any advise would be much appreciated.

Regards Siva

Parents
  • I don't know what the proper address of your temperature sensor is, but from you code it looks like you are using a LMB75B sensor. Which if this is the case I don't think 0x80 can possibly be the correct I2C address based on this line from the datasheet:

    The LM75B slave address on the I2C-bus is partially defined by the logic applied to the device address pins A2, A1 and A0. Each of them is typically connected either to GND for logic 0, or to VCC for logic 1. These pins represent the three LSB bits of the device 7-bit address. The other four MSB bits of the address data are preset to ‘1001’ by hard wiring inside the LM75B.

Reply
  • I don't know what the proper address of your temperature sensor is, but from you code it looks like you are using a LMB75B sensor. Which if this is the case I don't think 0x80 can possibly be the correct I2C address based on this line from the datasheet:

    The LM75B slave address on the I2C-bus is partially defined by the logic applied to the device address pins A2, A1 and A0. Each of them is typically connected either to GND for logic 0, or to VCC for logic 1. These pins represent the three LSB bits of the device 7-bit address. The other four MSB bits of the address data are preset to ‘1001’ by hard wiring inside the LM75B.

Children
No Data
Related