No video

How To Find Unknown I2C Addresses Several Ways

  Рет қаралды 19,382

Gadget Reboot

Gadget Reboot

Күн бұрын

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/Gad...
Arduino I2C Scanner Reference Code
playground.ard...
NXP I2C Specification Manual
www.nxp.com/do...
Adafruit I2C Device Address List
learn.adafruit...
Reference info on improper 8-bit I2C address referencing
www.totalphase...
Patreon: / gadgetreboot
Pinterest: www.pinterest....
Twitter: @GadgetReboot / gadgetreboot

Пікірлер: 38
@pileofstuff
@pileofstuff 6 жыл бұрын
That's one for the bookmarks. Thanks for taking the deep dive .
@GadgetReboot
@GadgetReboot 6 жыл бұрын
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.
@edwinedgar4420
@edwinedgar4420 3 жыл бұрын
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
@stevenferdin
@stevenferdin 3 жыл бұрын
Thanks man. I bought some oleds from China without the address on the chip and this was a huge help
@GadgetReboot
@GadgetReboot 3 жыл бұрын
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.
@johnjrgensen3541
@johnjrgensen3541 5 жыл бұрын
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 4 жыл бұрын
Simple and clear and set up is neat. Great.
@scisex3535
@scisex3535 Жыл бұрын
Better even than TI's video!
@danflurry
@danflurry 2 жыл бұрын
This was super helpful.
@electronic7979
@electronic7979 6 жыл бұрын
Useful video. Excellent
@nagarajugunda2949
@nagarajugunda2949 3 жыл бұрын
Very use full, excellent video.
@clineeco
@clineeco 3 жыл бұрын
Thank you for this, what a helpful video
@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: kzfaq.info/get/bejne/f8mAiKhe0LqyZWQ.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?
@jackmanjls
@jackmanjls 5 жыл бұрын
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.
@juststeve7665
@juststeve7665 Жыл бұрын
Excellent! Thank you!
@Jhill035
@Jhill035 Жыл бұрын
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..
@browaruspierogus2182
@browaruspierogus2182 6 жыл бұрын
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 6 жыл бұрын
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 6 жыл бұрын
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 6 жыл бұрын
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 6 жыл бұрын
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 6 жыл бұрын
Much easier is to just use CS line than have conflicts and mess with devices.
@noggin73
@noggin73 6 жыл бұрын
Nice video! What happens if two I2C devices have the same address :-) I seem to remember there's a workaround/hack.
@GadgetReboot
@GadgetReboot 6 жыл бұрын
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 6 жыл бұрын
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
@kjur18
@kjur18 6 жыл бұрын
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 6 жыл бұрын
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 6 жыл бұрын
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.
@lLucassFerreira
@lLucassFerreira 3 жыл бұрын
would connect 5 oled with this basic system?
@GadgetReboot
@GadgetReboot 3 жыл бұрын
This can use multiple OLEDs github.com/bitbank2/Multi_OLED
Solving I2C Address Conflicts - TCA9548A I2C Multiplexer
24:29
DroneBot Workshop
Рет қаралды 102 М.
Extracting Firmware from Embedded Devices (SPI NOR Flash) ⚡
18:41
Flashback Team
Рет қаралды 569 М.
这三姐弟太会藏了!#小丑#天使#路飞#家庭#搞笑
00:24
家庭搞笑日记
Рет қаралды 101 МЛН
Пройди игру и получи 5 чупа-чупсов (2024)
00:49
Екатерина Ковалева
Рет қаралды 4,3 МЛН
Kids' Guide to Fire Safety: Essential Lessons #shorts
00:34
Fabiosa Animated
Рет қаралды 17 МЛН
Bony Just Wants To Take A Shower #animation
00:10
GREEN MAX
Рет қаралды 7 МЛН
I2C and SPI on a PCB Explained!
15:34
Altium Academy
Рет қаралды 145 М.
Induction Coin Selector with Arduino
12:57
Electronoobs
Рет қаралды 38 М.
Datasheets: 16x2 LCD By Hand (No microcontroller)
26:35
Mitch Davis
Рет қаралды 98 М.
Top Fifteen Mistakes People Make When Designing Prototype PCBs
12:26
Cosplay Light and Sound
Рет қаралды 147 М.
Using EEPROM with Arduino - Internal & External
31:54
DroneBot Workshop
Рет қаралды 195 М.
Electronic Basics #19: I2C and how to use it
6:09
GreatScott!
Рет қаралды 416 М.
What is I2C, Basics for Beginners
18:30
nandland
Рет қаралды 164 М.
OLED Displays with Arduino - I2C & SPI OLEDs
41:41
DroneBot Workshop
Рет қаралды 1,1 МЛН
这三姐弟太会藏了!#小丑#天使#路飞#家庭#搞笑
00:24
家庭搞笑日记
Рет қаралды 101 МЛН