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

TWI Scanner I2C address is 1 bit wrong

I'm using <TWI Scanner> example on nRF52 DK to find my sensor's address.

According to the sensor datasheet, the sensor's address is 0x21. However, <TWI Scanner> finds the address at 0x20. 

Any idea, please? 

Parents Reply
  • for (address = 32; address < 34; address++)
        {
            NRF_LOG_INFO("Hi %d",address);
            err_code = nrf_drv_twi_rx(&m_twi, address, &sample_data, sizeof(sample_data));
            if (err_code == NRF_SUCCESS)
            {
                detected_device = true;
                NRF_LOG_INFO("TWI device detected at address 0x%x.", address);
            }
            NRF_LOG_FLUSH();
        }
    

    From the code and graph, you could see that ACK is LOW for address 32 (find the device at 0x20), ACK is HIGH for address 33 (no device at 0x21).

    However, my sensor datasheet says that if I connect the sensors' ADDR pin to GND, the address should be 0x21. Very strange issue!

    Any one help pls? 

Children
No Data
Related