Yeah I didn’t think I would have such a long video with so much info but it was very much a rabbit hole full of surprises and discoveries. I learned a lot and it helps me in general learn how to solve more upcoming inevitable problems.
Glad I can help. I was very confused with the OLED address and thought other people might be confused as well so I better document everything before I forget.
Thanks! Yes I was very confused so I ended up researching so much that I thought I might as well document in case I ever forget or anyone else is just as lost as me and can benefit.
sir, I am a beginner using i2c communication, I want to use a pressure sensor with type XGZP6857D and display the reading of the pressure value on arduino .. This sensor has an i2c communication protocol and I've scanned the i2c address for the sensor which is 0x6D ... but I do not understand how to access these sensor registers with the arduino code in order to get the pressure value you want displayed, maybe you have an idea for this problem? thank you..
According to another video about the I2C protocol there is a way to have 10 bit addresses on a device. Here is that video, that I'm talking about - I've also set a marker to the correct time: ruclips.net/video/IcPUE-kTN50/видео.html Maybe the device, which specifies an address in a reserved space is actually using two address frames and the library does not support it?
Auto-scan is sometimes useless because you do not know what device you are dealing with even if you found address. I had oled that had 2 addresses on it one write one read and that makes sense too
If you watched the video you would know it's only a tool. It's a start if you a) have a known device only with unknown address setting of b) have no clue about the device and you can use lookup lists like the one from Adafruit to get started. And no, having a read and a write address (in 7-bit) doesn't make sense. Not saying manufacturers will not do it :p
If a device had a separate address for read and for write, it sounds like they were giving you eight bits with a zero and a one at the end so the first seven bits would’ve been the true device address if I understand correctly. If you don’t already know what the I2C device is supposed to be then yes all you will learn about it is the address but even then you could probably try to search out what devices should be on that address because they should all be registered by NXP and there should only be a small number of possible options for what the device is.
It is just an ID not a true address but a way addressing a device with a byte value so I don't blame manufacturers making life easier for Arduino people
Browarus Pierogus No, it IS a real address. No ID involved ;) Scanners just start a transmission to every address (without payload) and just look for an ACK.
I could actually try that because I have three of the PCF 8574 GPIO expanders that I could set to all the same address but I think it would generally causes problems because all devices would try to respond and cause bus contention and maybe nothing gets detected when they try to talk. If there is a way to make it work that somebody came up with, that would be interesting but I can’t think of a way unless somebody throws in some sort of buffer/steering circuitry.
I found this discussion and the answers I like the best are a couple of variations of things like intercept the data line on the devices you do not want to talk to and allow the data to pass through on the device you do want to talk to so then they can have the same address but the others just won’t hear the data. electronics.stackexchange.com/questions/5096/how-to-resolve-i2c-address-clashes
There is Universal 8bit Graphics Library (github.com/olikraus/u8g2/). I used this for my oled display, and had no problems with i2c addresses. Maybe because it's built differently. You can use this library with all sorts of displays, list is huge.
Yeah I still have another display kicking around actually I think I have two kicking around that I haven’t even used yet so I will be checking out lots of display drivers still. I’ve only just begun!
I'm interested in memory usage of both libraries. This universal library has 3 modes: full buffer (heavy memory usage), page buffer (smaller memory usage), and text only mode, with one font only.
An excellent introduction to I2C showing the pit falls and how to get out of the pit.
Where to look for the HEX addresses.
Thank you
That's one for the bookmarks.
Thanks for taking the deep dive .
Yeah I didn’t think I would have such a long video with so much info but it was very much a rabbit hole full of surprises and discoveries. I learned a lot and it helps me in general learn how to solve more upcoming inevitable problems.
Thanks man. I bought some oleds from China without the address on the chip and this was a huge help
My first OLED had the address in a different notation so it wasn't usable until I did this to find out what it really was.
Very usefull, thanks! I2C can be decieving at times. I'm working on a robot project, and your summary will ease my work too. Thanks again :)
Glad I can help. I was very confused with the OLED address and thought other people might be confused as well so I better document everything before I forget.
Simple and clear and set up is neat. Great.
This was super helpful.
Very use full, excellent video.
Thank you for this, what a helpful video
Useful video. Excellent
This is excellent...you've done your homework and it shows :)>
Thanks! Yes I was very confused so I ended up researching so much that I thought I might as well document in case I ever forget or anyone else is just as lost as me and can benefit.
can you tell me how to find the addresses for the A M10Q 5883 gps module?
Excellent! Thank you!
sir, I am a beginner using i2c communication, I want to use a pressure sensor with type XGZP6857D and display the reading of the pressure value on arduino .. This sensor has an i2c communication protocol and I've scanned the i2c address for the sensor which is 0x6D ... but I do not understand how to access these sensor registers with the arduino code in order to get the pressure value you want displayed, maybe you have an idea for this problem? thank you..
According to another video about the I2C protocol there is a way to have 10 bit addresses on a device. Here is that video, that I'm talking about - I've also set a marker to the correct time: ruclips.net/video/IcPUE-kTN50/видео.html
Maybe the device, which specifies an address in a reserved space is actually using two address frames and the library does not support it?
Auto-scan is sometimes useless because you do not know what device you are dealing with even if you found address.
I had oled that had 2 addresses on it one write one read and that makes sense too
If you watched the video you would know it's only a tool. It's a start if you a) have a known device only with unknown address setting of b) have no clue about the device and you can use lookup lists like the one from Adafruit to get started. And no, having a read and a write address (in 7-bit) doesn't make sense. Not saying manufacturers will not do it :p
If a device had a separate address for read and for write, it sounds like they were giving you eight bits with a zero and a one at the end so the first seven bits would’ve been the true device address if I understand correctly.
If you don’t already know what the I2C device is supposed to be then yes all you will learn about it is the address but even then you could probably try to search out what devices should be on that address because they should all be registered by NXP and there should only be a small number of possible options for what the device is.
It is just an ID not a true address but a way addressing a device with a byte value so I don't blame manufacturers making life easier for Arduino people
Browarus Pierogus No, it IS a real address. No ID involved ;) Scanners just start a transmission to every address (without payload) and just look for an ACK.
Much easier is to just use CS line than have conflicts and mess with devices.
Nice video! What happens if two I2C devices have the same address :-)
I seem to remember there's a workaround/hack.
I could actually try that because I have three of the PCF 8574 GPIO expanders that I could set to all the same address but I think it would generally causes problems because all devices would try to respond and cause bus contention and maybe nothing gets detected when they try to talk.
If there is a way to make it work that somebody came up with, that would be interesting but I can’t think of a way unless somebody throws in some sort of buffer/steering circuitry.
I found this discussion and the answers I like the best are a couple of variations of things like intercept the data line on the devices you do not want to talk to and allow the data to pass through on the device you do want to talk to so then they can have the same address but the others just won’t hear the data.
electronics.stackexchange.com/questions/5096/how-to-resolve-i2c-address-clashes
would connect 5 oled with this basic system?
This can use multiple OLEDs github.com/bitbank2/Multi_OLED
There is Universal 8bit Graphics Library (github.com/olikraus/u8g2/). I used this for my oled display, and had no problems with i2c addresses. Maybe because it's built differently. You can use this library with all sorts of displays, list is huge.
Yeah I still have another display kicking around actually I think I have two kicking around that I haven’t even used yet so I will be checking out lots of display drivers still. I’ve only just begun!
I'm interested in memory usage of both libraries. This universal library has 3 modes: full buffer (heavy memory usage), page buffer (smaller memory usage), and text only mode, with one font only.
omg are you from Canada 🇨🇦?
Yes!