Page 1 of 1

Trying SSD1305 display from adafruit

Posted: Thu May 19, 2022 3:31 am
by liudr
I'm trying an SSD1305 chip display from adafruit with the ssd1306 driver:

Display:

https://www.adafruit.com/product/4567

Code I was using was based on this reference on ESP8266 and I modified it to work, sort of:

https://docs.micropython.org/en/latest/ ... 306-driver

Snippet:

Code: Select all

from machine import Pin, I2C
import ssd1306
i2c=I2C(0,sda=Pin(22),scl=Pin(19),freq=100000)
i2c.scan()
display = ssd1306.SSD1306_I2C(128, 64, i2c)
display.rotate(False)
display.text('Hello, World!', 0, 0, 1)
display.text('Hello, World!', 0, 12, 1)
display.text('Hello, World!', 0, 24, 1)
display.show()
I copied ssd1306.py from here:

https://github.com/micropython/micropyt ... ssd1306.py

This youtube video claimed it worked:

https://www.youtube.com/watch?v=KChW4qvw33o

What I got was a lot of ghosting across the vertical dimension of the display. I wonder if it's the display unit that is defective or not. I also have to disable rotate and pretend it were 64 pixels tall although it's only 32 pixels tall.
20220518_222130-small.jpg
20220518_222130-small.jpg (262.5 KiB) Viewed 4757 times
I'm wondering if this driver isn't compatible, i.e. ssd1306 driver on ssd1305 chipset.

Re: Trying SSD1305 display from adafruit

Posted: Thu May 19, 2022 4:31 pm
by liudr
So here is another SSD1305 display I was running SPI on. You can see the streaks run all the way across the vertical dimension from the characters to the bottom.
20220519_112931 (2).jpg
20220519_112931 (2).jpg (168.41 KiB) Viewed 4742 times

Re: Trying SSD1305 display from adafruit

Posted: Fri May 20, 2022 3:29 am
by liudr
Seems to be driver issue. I tested with Arduino IDE and adafruit libraries and the display worked fine. I wish we could get an SSD1305 driver for mp. You can do many project if you have a display.

Re: Trying SSD1305 display from adafruit

Posted: Fri May 20, 2022 9:15 am
by pythoncoder
I appreciate this is no help to you, but in general I would recommend reviewing the wide range of supported displays before buying hardware.

Re: Trying SSD1305 display from adafruit

Posted: Fri May 20, 2022 1:18 pm
by liudr
Maybe there's a reason for such incompatibility. Adafruit sells ssd1305 displays and their libraries are circuitpython/arduino. If they wrote micropython libraries I bet their sales will likely drop. They have circuitpython only running on their own boards. Maybe ssd1305 is their turf.

Re: Trying SSD1305 display from adafruit

Posted: Fri May 20, 2022 2:24 pm
by danhalbert
liudr wrote:
Fri May 20, 2022 1:18 pm
Adafruit sells ssd1305 displays and their libraries are circuitpython/arduino. They have circuitpython only running on their own boards. Maybe ssd1305 is their turf.
At the moment, CircuitPython builds are available for 301 boards, of which 72 are Adafruit boards. The PyBoard is one of the builds. See https://circuitpython.org/downloads.

We do not have the resources to write MicroPython libraries for our breakouts. It's usually relatively easy to adapt a CircuitPython library to MicroPython. We hope that our libraries can be starting points for library support for MicroPython and other language environments.

Re: Trying SSD1305 display from adafruit

Posted: Fri May 20, 2022 5:58 pm
by pythoncoder
@liudr Adafruit are entirely cooperative with MicroPython.

There are only a few of us that write display drivers and port CircuitPython drivers to MP. But the process takes time and some cash. We have to buy a board, create a test setup, port the code and test it. In my experience, having done this quite a few times, this involves studying the display driver chip datasheet in order to fully understand the code. It is reasonably straightforward, but not a five minute job.

There are an awful lot of driver chips, and a lot of ways manufacturers choose to wire them up.

Realistically your choices are to roll your sleeves up and port the Adafruit driver yourself, hopefully publishing your code. Or swap to a ready-supported display.

Re: Trying SSD1305 display from adafruit

Posted: Sat May 21, 2022 5:32 am
by rdagger
I haven't worked with the SSD1305 but I did write a Micropython library for the SSD1309. I have not looked at the datasheet for the SSD1305 but you might get lucky. Just make sure to specify the correct width and height when you initialize the display. Regardless, it would probably be easy to modify my library for the SSD1305.

When writing display drivers I usually write a function to dump all the registers. I can then compare the registers between the working and non-working code.