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

TWI scanner with two nrf52840 boards

Hello,

I am using two nrf52840 DK boards, I tried to run TWI scanner example on one of the boards of SDK 15.0 example. I'm not getting the other device address it is giving  message as "no device detected". I have connected the SCL and SDA pins respectively and given the power supply from the board in which twi scanner example is running to other board with external supply pins(Even if I have connected with two cables for supply independently not getting the address).

Kindly, suggest the possible method to find the address of the nrf52840 board .

Parents
  • I have connected the SCL and SDA pins respectively

    How, exactly, have you connected them?

    Show a schematic (as an image - see below) - it is far easier and clearer than trying to describe connections in words!

    A photograph may also be informative.

    Do you need pullups?

    I tried to run TWI scanner example on one of the boards

    And have you programmed an I2C slave into the other one?

    Have you looked at the I2C lines with an oscilloscope or analyser to see what (if anything) is happening?

    Does the TWI Scanner detect a standard I2C chip if you connect it instead of the 2nd DK? If it does, what happens when you connect it at the same time as the other DK ?

    suggest the possible method to find the address of the nrf52840 board

    You should be able to see that in the code?

    How to post images:

  • Hello awneil,

    Thank you for the quick response. When I have connected the sdk(nrf52840) to MAX30100 sensor using TWI scanner example running in sdk it can read the device address and it is showing the address as 0x57. But, when i have connected to another sdk(nrf52840) it is showing as "no device was found" please find the attached images.  nrf52840 connected to MAX30100Device address detected

    two nrf52840 dk connectedNo device found for two sdk boards connected

    What i wanted is i'm trying to establish communication between STM32F769I DISC0  and nrf52840 board using i2c communication so to transmit from STM board i need the nrf52840 DK device address. How exactly can i get the address ?

    Your help will be much appreciated.

  • when i have connected to another sdk(nrf52840) it is showing as "no device was found"

    So, again, have you programmed an I2C slave into that other DK?

    If you have both the MAX30100 and the 2nd DK connected, is the MAX30100 still detected?

    Have you looked at the I2C lines with an oscilloscope or analyser to see what is happening?

    How exactly can i get the address ?

    Again, when you're making an I2C Slave on any microcontroller, then you assign its address in your code!

    Note:

    To take a screenshot on a Windows computer:

    • Use the 'PrintScreen' (sometimes abbreviated; eg, 'PrtSc') button to capture the entire screen;
    • Use Alt+PrintScreen to capture just the active window.
  • Thank you, I have not programmed I2C slave in other DK. I just tried to run TWI scanner on one board to get the address of other board but, it did not work that way. As you suggested I will run I2C slave in one board and try again.  

    How do i assign I2C slave to any controller (address in code) can you give a code snippet ?

Reply Children
Related