How To Find Unknown I2C Addresses Several Ways

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ก.ย. 2018
  • After struggling to get a 128x64 OLED display working over I2C, I learned many things about I2C addressing including:
    -There are 7-bit and 10-bit addressing schemes
    -There is no 8-bit addressing scheme, but some vendors improperly provide 8 bit addresses
    -There are a few shortcuts to finding out what the real I2C address of a device may be
    -As a last resort, an I2C scanner can be employed to locate all valid devices on the bus and report their addresses
    This is a video of my journey!
    Previous video with I2C address issues
    • How to use a 128x64 OL...
    Sketch for I2C Scanner:
    github.com/GadgetReboot/Ardui...
    Arduino I2C Scanner Reference Code
    playground.arduino.cc/Main/I2...
    NXP I2C Specification Manual
    www.nxp.com/docs/en/user-guid...
    Adafruit I2C Device Address List
    learn.adafruit.com/i2c-addres...
    Reference info on improper 8-bit I2C address referencing
    www.totalphase.com/support/ar...
    Patreon: / gadgetreboot
    Pinterest: www.pinterest.ca/GadgetReboot
    Twitter: @GadgetReboot / gadgetreboot
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 38

  • @edwinedgar4420
    @edwinedgar4420 3 ปีที่แล้ว +1

    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

  • @pileofstuff
    @pileofstuff 5 ปีที่แล้ว +5

    That's one for the bookmarks.
    Thanks for taking the deep dive .

    • @GadgetReboot
      @GadgetReboot  5 ปีที่แล้ว +1

      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.

  • @johnjrgensen3541
    @johnjrgensen3541 5 ปีที่แล้ว +2

    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 :)

    • @GadgetReboot
      @GadgetReboot  5 ปีที่แล้ว

      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.

  • @ashif4280
    @ashif4280 3 ปีที่แล้ว +2

    Simple and clear and set up is neat. Great.

  • @stevenferdin
    @stevenferdin 3 ปีที่แล้ว +2

    Thanks man. I bought some oleds from China without the address on the chip and this was a huge help

    • @GadgetReboot
      @GadgetReboot  3 ปีที่แล้ว +1

      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.

  • @clineeco
    @clineeco 3 ปีที่แล้ว +1

    Thank you for this, what a helpful video

  • @danflurry
    @danflurry 2 ปีที่แล้ว +2

    This was super helpful.

  • @nagarajugunda2949
    @nagarajugunda2949 2 ปีที่แล้ว +1

    Very use full, excellent video.

  • @electronic7979
    @electronic7979 5 ปีที่แล้ว +2

    Useful video. Excellent

  • @jackmanjls
    @jackmanjls 5 ปีที่แล้ว +1

    This is excellent...you've done your homework and it shows :)>

    • @GadgetReboot
      @GadgetReboot  5 ปีที่แล้ว

      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.

  • @scisex3535
    @scisex3535 ปีที่แล้ว +1

    Better even than TI's video!

  • @juststeve7665
    @juststeve7665 ปีที่แล้ว

    Excellent! Thank you!

  • @FlightHeroRC1
    @FlightHeroRC1 9 หลายเดือนก่อน

    can you tell me how to find the addresses for the A M10Q 5883 gps module?

  • @ilhamrahmatmuharam8501
    @ilhamrahmatmuharam8501 4 ปีที่แล้ว

    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..

  • @Noxoreos
    @Noxoreos ปีที่แล้ว

    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: th-cam.com/video/IcPUE-kTN50/w-d-xo.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?

  • @noggin73
    @noggin73 5 ปีที่แล้ว +1

    Nice video! What happens if two I2C devices have the same address :-)
    I seem to remember there's a workaround/hack.

    • @GadgetReboot
      @GadgetReboot  5 ปีที่แล้ว +1

      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.

    • @GadgetReboot
      @GadgetReboot  5 ปีที่แล้ว

      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

  • @browaruspierogus2182
    @browaruspierogus2182 5 ปีที่แล้ว

    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

    • @tengelgeer
      @tengelgeer 5 ปีที่แล้ว

      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

    • @GadgetReboot
      @GadgetReboot  5 ปีที่แล้ว

      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.

    • @browaruspierogus2182
      @browaruspierogus2182 5 ปีที่แล้ว

      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

    • @tengelgeer
      @tengelgeer 5 ปีที่แล้ว

      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.

    • @browaruspierogus2182
      @browaruspierogus2182 5 ปีที่แล้ว

      Much easier is to just use CS line than have conflicts and mess with devices.

  • @lLucassFerreira
    @lLucassFerreira 3 ปีที่แล้ว

    would connect 5 oled with this basic system?

    • @GadgetReboot
      @GadgetReboot  3 ปีที่แล้ว

      This can use multiple OLEDs github.com/bitbank2/Multi_OLED

  • @kjur18
    @kjur18 5 ปีที่แล้ว +1

    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.

    • @GadgetReboot
      @GadgetReboot  5 ปีที่แล้ว

      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!

    • @kjur18
      @kjur18 5 ปีที่แล้ว +1

      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.