How can I use two I2C modules?

Hi,

I want to measure CO2 in different locations using two similar CO2 sensor (MiCS-VZ-89TE). I can communicate with the sensor over I2C0.

But because two sensors have exactly the same I2C address, I cannot connect the second sensor to the same I2C0 module.

How can I activate I2C1 and where are the SDA and SCL pins of I2C1?

Parents Reply
  • I am able to debug it, but I don't know where to look/check.

    It seems TWIM0 and TWIM1 registers are configured correctly, at least pin numbers in PSEL are correct.
    But in Address (is it a register?) is wrong. At TWIM0 it is 0x70, and at TWIM1 it is 0.

    My devicetree overlay snippet:

    &i2c0 {
        vz89te0: vz89te0@70 {
            compatible = "i2c-device";
            label = "MiCS-VZ-89TE-0";
            reg = <0x70>;
        };
    };
    
    &i2c1 {
        status = "okay";
        vz89te1: vz89te1@70 {
            compatible = "i2c-device";
            label = "MiCS-VZ-89TE-1";
            reg = <0x70>;
        };
    };

Children
Related