Electronic – If an I2C device does not appear in i2cdetect does it mean the device is potentially broken

beaglebone blacki2c

I am trying to get an I2C OLED (128×64) display working on a BeagleBoneBlack. Unfortunately, no matter what I2C port I try I cannot see the device when using the i2cdetect utility. As you can see below, i2c-0 and i2c-2 are "scannable" using the utility, however no device shows up. The OLED panels generally show up at either 0x3C or 0x3D (in this case 0x3C). The OLED panel is controlled using the SSD1306 controller. I am still learning about i2c, but from what I understand, a device should have a unique address that will show up using the i2cdetect utility.

Any tips on troubleshooting would be helpful. The c++ code I have is quite involved, but I can post it if you think necessary.

enter image description here

enter image description here

The BeagleBone should have 2 I2C ports available according to my web searches. I have tried all the scl and sda pairs listed on the P9 header.

enter image description here

Previously, when I used an I2C LED Panel, I got the output below and was able to write to various pixels in the matrix. As you can see, in that case I had a device available at 0x70.

enter image description here

UPDATE:

I asked the author of the library and this is what he wrote:

It sounds like the SPI device you're using might not be enabled with a device tree overlay. Can you try running this command to show all the SPI devices?

ls /dev/spi*
Based on the device and port you should see a /dev/spidev1.0 device. If you don't see that device then you'll need to enable it with a device overlay. Check out the bottom of this page for a little more info on how to enable the SPI device: https://learn.adafruit.com/ssd1306-oled-displays-with-raspberry-pi-and-beaglebone-black/wiring

One other thing to be careful about, since it looks like you're using Ubuntu. Make sure the kernel version is 3.8.x and not a later one like 3.14.x. The later kernels don't support device tree overlays so they can't dynamically add SPI ports, etc. You can check the kernel version by runnning:

uname -r
If it's a later kernel (like 3.14) try installing the official Debian image from there as it's still using 3.8: http://beagleboard.org/latest-images

enter image description here

It seems that /dev/spi* does not exist, and that I am running a later version of ubuntu (3.14), both of which could be bad. It's a bit beyond me why Ubuntu 3.14 would stop supporting device tree overlays, and why I can't access these pins.

Best Answer

Are the busses pulled up with resistors? I2C is open drain, and needs to be pulled up.

From m.eet.com/media/1158028/296877-design_calculations_for_robust_i2c_fig1.jpg

From http://m.eet.com/media/1158028/296877-design_calculations_for_robust_i2c_fig1.jpg