Skip to content

I2C: garbage output on DragonBoard410c #28

Open
@ric96

Description

@ric96

I get garbage OR whatever was there on the last frame displayed on the display, and the code hangs for a long time.
Here is an example of the oled displaying the last frame, while running the demo code in readme:

This library is working as expected, so at least its not hw.
https://github.com/codelectron/ssd1306

Activity

ladyada

ladyada commented on Jul 24, 2019

@ladyada
Member

do you know for sure that display is SSD1306? knockoffs often use other chipsets

deshipu

deshipu commented on Jul 24, 2019

@deshipu
Contributor

In particular, SH1106 is very popular, but sadly it doesn't support the addressing mode that SSD1306 uses by default (so most drivers won't work).

ric96

ric96 commented on Jul 24, 2019

@ric96
Author

I've tried this display with Arduino, Zephyr, MRAA and the above mentioned library all worked fine so i'm assuming its SSD1306.

makermelissa

makermelissa commented on Jul 24, 2019

@makermelissa
Collaborator

What is the exact code that you're running and what are the dimensions of that display? I'd like to test it out on a similar setup with an equivalent Adafruit display.

makermelissa

makermelissa commented on Jul 25, 2019

@makermelissa
Collaborator

A couple of things I just thought of are if this is running on the DragonBoard 410c and you're using a logic level shifter:

  1. Make sure it's I2C Safe such as https://www.adafruit.com/product/757
  2. Make sure VCC is 3.3v and not 5V or at least the same voltage as the logic levels.
ric96

ric96 commented on Jul 25, 2019

@ric96
Author

@makermelissa running the code that is in the Readme of this repo under usage example.
I've got a bmp280 working fine with this very setup.
I've separately tried a 128x32 and 128x64 oled display. Both of these had the i2c address set to 0x3c if that helps.
Again, the display works fine using another library so i think I'm good on the level shifter end.
PS. Using the Audio Mezzanine as the level shifter. This has worked well for i2c usecases over the years.

makermelissa

makermelissa commented on Jul 29, 2019

@makermelissa
Collaborator

Hi, I finally got around to testing with https://www.adafruit.com/product/931 on the DragonBoard and can confirm that the issue occurs (random dots plus hanging) with Adafruit displays as well.

makermelissa

makermelissa commented on Jul 29, 2019

@makermelissa
Collaborator

After hitting Control-C and waiting a couple minutes, I finally got this error output in addition to the expected keyboard interrupt error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/adafruit_bus_device/i2c_device.py", line 68, in __init__
    i2c.writeto(device_address, b'')
  File "/usr/local/lib/python3.7/dist-packages/busio.py", line 65, in writeto
    return self._i2c.writeto(address, buffer, stop=stop)
  File "/usr/local/lib/python3.7/dist-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py", line 38, in writeto
    self._i2c_bus.write_bytes(address, buffer[start:end])
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_PureIO/smbus.py", line 244, in write_bytes
    self._device.write(buf)
OSError: [Errno 22] Invalid argument
makermelissa

makermelissa commented on Jul 31, 2019

@makermelissa
Collaborator

I wonder if this is related to adafruit/Adafruit_Python_PureIO#4

ladyada

ladyada commented on Jul 31, 2019

@ladyada
Member

probably not, smbus is the native I2C library/interface, havint it in pureio would be rad, but its really not essential. also repeated start isnt used on this display

makermelissa

makermelissa commented on Jul 31, 2019

@makermelissa
Collaborator

Ok, good to know :)

ric96

ric96 commented on Sep 9, 2019

@ric96
Author

Hi,
any updates on this?

makermelissa

makermelissa commented on Sep 9, 2019

@makermelissa
Collaborator

Hi, thanks for checking in. I was planning on taking another look at this later this week.

makermelissa

makermelissa commented on Sep 11, 2019

@makermelissa
Collaborator

I think I may have found something in that Blinka has trouble with i2c write-only devices on certain boards (DragonBoard 410c and Jetson Nano I've found). I'm looking into this further.

makermelissa

makermelissa commented on Jan 20, 2020

@makermelissa
Collaborator

This might just need a reset line hooked up. I've seen similar behavior with microcontrollers. That solution will probably only work with the displays that have a reset line though.

7 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      I2C: garbage output on DragonBoard410c · Issue #28 · adafruit/Adafruit_CircuitPython_SSD1306