Problem with SSD1306 LCD and U8glib

Hi community!

I bought this tiny I2C lcd http://www.ebay.de/itm/181287662115?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649
and I connected it like this:
VCC -> 5V
GND -> GND
SCL -> A5
SDA -> A4
I tried some examples from the current version of u8glib.h, but nothing worked.
I used this code:

#include "U8glib.h"

U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);	

void draw() {

  u8g.setFont(u8g_font_unifont);
  u8g.drawStr( 0, 20, "Hello World!");
}

void setup() {
}

void loop() {

  u8g.firstPage();  
  do {
    draw();
  } while( u8g.nextPage() );
    delay(1000);
}

The sketch compiles, but the display stays black. :frowning:
Any hints what I can do?

Thanks and regards,
F.

Edit: I think this is the wrong board. Sorry....

I reported this thread to a moderator, it will probably be has been put in the Display section.

Have a look at this thread (click).
It is about this display, but on an other pcb.
At the end u8glib is discussed here, and u8glib has its own topic in this Display section.

Did you apply pull up resistors for the display?
Which Arduino board do you use?

Oliver

Can you run the i2c_scanner ?
http://playground.arduino.cc/Main/I2cScanner
If it doesn't find an I2C addres, you have a display that can not pull the SDA low for an acknowledge. I don't know if the u8glib can do that. I have seen a library for that, perhaps I can try to find it if you want.

Hi,
thanks for the answers.

olikraus:
Did you apply pull up resistors for the display?
Which Arduino board do you use?

Oliver

No, there are no pull up resistors. Do I need one?

Caltoa:
Can you run the i2c_scanner ?
Arduino Playground - I2cScanner
If it doesn't find an I2C addres, you have a display that can not pull the SDA low for an acknowledge. I don't know if the u8glib can do that. I have seen a library for that, perhaps I can try to find it if you want.

Thank you for this hint. The scanner finds no devices. :frowning:

MAS3:
I reported this thread to a moderator, it will probably be has been put in the Display section.

Have a look at this thread (click).
It is about this display, but on an other pcb.
At the end u8glib is discussed here, and u8glib has its own topic in this Display section.

I'll have a closer look into that on this evening. Thank you.

No, there are no pull up resistors. Do I need one?

Yes, one 4.7K for SCL and another 4.7K for SDA. One end of the resistor to +5V (i assume that this is a 5V tolerant display module) and the other end of the resistor to the signal lines SCL and SDA.

Once these resistors are there,. the scanner should find a device at 0x3c.

Oliver

olikraus:

No, there are no pull up resistors. Do I need one?

Once these resistors are there,. the scanner should find a device at 0x3c.

No. Resistors are there, but the scanner says "No devices found"

In that case, you might have a super cheap OLED, that can only read I2C and can not acknowledge it.
Does it say 'heltec.cn' on the backside ?

The rar file on this page contains code for it.
http://www.wide.hk/products.php?product=I2C-0.96"-OLED-display-module-(-compatible-Arduino-)
That code doesn't do anything special, so perhaps the u8glib will work with it.
They say it is Adafruit compatible, perhaps you can use the Adafruit library or the u8glib with Adafruit mode.

For the u8glib, you have to ask in the u8glib thread if the display is supported.
I only started recently using u8glib with another super cheap OLED.
http://forum.arduino.cc/index.php?topic=217290.0

Caltoa:
In that case, you might have a super cheap OLED, that can only read I2C and can not acknowledge it.
Does it say 'heltec.cn' on the backside ?

Yes, it's one of those super cheap OLEDs with heltec.cn on the backside.

Caltoa:
The rar file on this page contains code for it.
http://www.wide.hk/products.php?product=I2C-0.96"-OLED-display-module-(-compatible-Arduino-)
That code doesn't do anything special, so perhaps the u8glib will work with it.
They say it is Adafruit compatible, perhaps you can use the Adafruit library or the u8glib with Adafruit mode.

For the u8glib, you have to ask in the u8glib thread if the display is supported.
I only started recently using u8glib with another super cheap OLED.
OLED display with 4-wire SPI mode, but without CS - Displays - Arduino Forum

I tried the code from wide.hk, but nothing happens :frowning:

Perhaps something else is wrong with it. Perhaps it is broken. Sorry, but I don't know what else you could do.

Maybe you can post a picture of your setup to verify your wiring.

Oliver

Hello,
here are 2 pictures. Not the best quality, but I think it should be enough...

Wiring seems okay.

Yes.
Do you know what I can do, to test if it's broken? Using a multimeter or something?

hmm... i am also running out of ideas... In those cases i usually start to use my scope to observere activity on the signal and clock lines.

Oliver

My best advice at this point it to forget that display.
Buy a better display from a good company that sells electronics which work: Monochrome 0.96 128x64 OLED Graphic Display - STEMMA QT : ID 326 : $17.50 : Adafruit Industries, Unique & fun DIY electronics and kits

Hello,
I just wanted to tell you, that the module is working now.
I wrote to the chinese seller, and he sent me a link to a chinese website with a working library and code: 14blog.com
Google-translate does hard work on this page :wink:

BTW the module doesn't need any resistors, and it works on every digital pin.

Thanks for help!

Regards.

@ Oliver:

Can you please take a look at the library and check if the module works also with u8glib?
The provided library is really "buggy".

Thanks for the feedback. Main problem is, that i do not own this display. So i can not do any tests on it.

Oliver

olikraus:
Thanks for the feedback. Main problem is, that i do not own this display. So i can not do any tests on it.

Oliver

OK. Thanks anyway!