Go Down

Topic: Flickering with SSD1306 over SPI using u8glib (Read 617 times) previous topic - next topic


I bought an 1.3" 128X64 OLED display on ebay some time ago, I believe it uses the SSD1306 chip. The display has 6 pins (VCC, GND, CLK, MOSI, CS, D/C), there is no reset line. I connected CLK and MOSI to the HW SPI ports of an Arduino Micro, CS to port 7, and D/C to port 8. Triple checked the wiring.

Running the HelloWorld example with the constructor below results in the text showing up on the screen, but the display refreshes lead to flickering (see video).

Code: [Select]
U8GLIB_SSD1306_128X64 u8g(7, 8);

Has anybody seen this sort of thing before and can advise on how to approach this problem?



Apr 09, 2015, 01:57 pm Last Edit: Apr 09, 2015, 01:58 pm by 8P9BZ

looks like you have an SPI display there so give another constructor a try: (with arguments for CLK and MOSI and with your pin numbers of course, A0 = DC)

U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9);   // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9

i am a total newbie to this but maybe it helps.

viel erfolg :)



Hi Alex,

I've tried that, rewired for SW SPI, i.e. used standard ports for CLK and MOSI, and used this constructor line. Unfortunately, the display remains black :(

I've also tried the Adafruit 1306 library (https://github.com/adafruit/Adafruit_SSD1306), but with the same effect, flickering with HW SPI and darkness with SW.

Thank you anyway, that was certainly worth a try!



I also had such a effect once. Try changing your power supply, e.g. 3.3V instead of 5V or 5V instead of 3.3V



I also had such a effect once. Try changing your power supply, e.g. 3.3V instead of 5V or 5V instead of 3.3V

That was it! Changing from 5V to 3.3V, and the flickering is gone. Apparently, this display is not laid out for 5V. Damn, I could have thought about this myself.

Thanks a bunch!


Run into the same problem. This thread save my day!
I'd believe that in the sellers description was 5V compatible. Some Aliexpress. But I may be wrong.
Anyway many thanks guys!!

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131