Getting a NACK from slave device communication through IIC

Discussion in 'Embedded Systems and Microcontrollers' started by Nirupama.T, May 3, 2019.

  1. Nirupama.T

    Thread Starter New Member

    May 3, 2019
    2
    0
    Hi all,
    I am trying to communicate with Kionix 124-1051 in my nRF52832 board using IIC. The slave is not responding after sending the slave address. I have checked all the possible conditions to make this work. Every time i get the same result. Clock, slave address, etc are all correct. But i don't know what's the problem. Any help could be appreciated.

    Thanks,
    Nirupama.T
     
  2. Ian Rogers

    Well-Known Member

    Dec 12, 2012
    611
    163
    Is the ADDR pin grounded or set high?... what address are you using... Can I see your init routine...
     
  3. Nirupama.T

    Thread Starter New Member

    May 3, 2019
    2
    0
    Yes, ADDR pin is grounded and address of the sensor is 0x1E. I tried running TWI scanner app, there I am not getting any No device is found, but I am also not getting the address of the slave.
     
  4. Ian Rogers

    Well-Known Member

    Dec 12, 2012
    611
    163
    And does the TWI code take care of the read / write bit? The SAD is 7 bit so it will end up as 0x3C + R/Wbit..

    Is there pullup resistors on the dev board for SDA and SCL?
     
  5. BobaMosfet

    Distinguished Member

    Jul 1, 2009
    597
    131
    Do you understand i2c communications? It's very straightforward and the signal levels will tell you what state it's in. Use an oscilloscope and watch the signals.
     
Loading...