[Question] I2C module in RPI #704
Replies: 8 comments
-
It should trigger the Repeated Start Condition on the bus: https://www.i2c-bus.org/repeated-start-condition |
Beta Was this translation helpful? Give feedback.
-
Apparently WiringPiI2C contains only basic functions for reading and writing, perhaps it would be better to interact with the i2c kernel driver directly. |
Beta Was this translation helpful? Give feedback.
-
Perhaps? WiringPi seems to just wrap Looking through the search results for "RPi I2C" there seems to be a lot of issues and confusion about the I2C in general… 😬 |
Beta Was this translation helpful? Give feedback.
-
I mean you can try to do a write-stop-start-read sequence to get you started with something, but it's functionally different than a write-restart-read sequence and some devices will not work correctly. But it may work for your devices for now and I'll be happy to merge this with a big disclaimer about restart conditions that someone else can then fix. |
Beta Was this translation helpful? Give feedback.
-
I want to use for an I2C SSD1306 LCD, and after looking at the SSD1306 driver I see that it uses restart so I'm not sure if it will work without modifying the SSD1306 driver. |
Beta Was this translation helpful? Give feedback.
-
You can use the RPI GPIO drivers ( |
Beta Was this translation helpful? Give feedback.
-
Although I'm not sure how to set OpenDrain mode with WiringPi, but @henrikssn used it with our I2C and SPI Bitbang drivers I believe? |
Beta Was this translation helpful? Give feedback.
-
I only tried the SPI bitbang interface with RPi, it worked fine at a modest 50kHz clock. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am trying to add a new I2C module to the Raspberry Pi Platform. It's basically a wrapper of the library WiringPi.
In the file I2C_master.cpp, I'm a stuck in the implementation of a function that executes a transaction. I couldn't understand well how I2C_transaction s work exactly (for example what to do when the next transaction is a Restart).
This is the function that executes a transaction (called in the startTransaction function)
I added just Write operation (as a first step).
To sum up, my question is
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions