This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

I2C/TWI slave with nRF51822

Hi

I need to implement I2C slave side (up to 100kBit/s) on a nRF51822 chip. As far as i see the inegrated TWI peripherial only supportes the master side. Any ideas how to do it? The following ways came to my mind, but all seam not the way to go.

Software I2C There are some code segments around to implement a software I2C solution by bitbanging. These solutions often are unstable and probably not fast enough to reach 100kBit/s. Additionally it may be a problem to run it beside the active S110 softdevice, because the softdevice may block the CPU in low stack for multiple milliseconds.

External Peripherial Another possible way is to use an external chip to do the I2C, but to be honest i didn't find a simple solution there. The only way to do it this way is the connect a PIC or something similar to the Nordic and implement the I2C on the PIC. The Nordic could communicate with the PIC over UART or SPI. Are the fix programmed chips that can be used as external peripherial?

Any other thought about this?

Regards Adrian

  • Hi

    In our application, the nRF51 needs to combine the role as I2C-slave and I2C-master at the same bus. This is because we have event triggered I2C-telegrams in both directions. As long as the nRF51 does not have any telegram to send, it listenes in slave mode. If it wants to send a telegramm, it switches temporarily to master mode.

    Afaik, the SC18IS602B works only as I2C-slave. At the moment, I am thinking about using the nRF51 peripheral TWI0 as I2C-master and the SPI0 to connect the SC18IS602B. The I2C-bus of this chip I want to connect to the TWI0. If anyone knows a simpler solution, I would be very interested.

    @Adrian: For me, too, I2C-slave functionality is a point for the wishlist of the next chip generation from Nordic.

Related