Go Down

Topic: Problem with SSD1306 LCD and U8glib (Read 12390 times) previous topic - next topic

Frantischek

Feb 19, 2014, 08:01 pm Last Edit: Feb 19, 2014, 10:00 pm by Frantischek Reason: 1
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:
Code: [Select]

#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. :(
Any hints what I can do?

Thanks and regards,
F.

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

MAS3

#1
Feb 19, 2014, 10:42 pm Last Edit: Feb 19, 2014, 10:43 pm by MAS3 Reason: 1
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.
Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

olikraus

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

Oliver

Caltoa

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.

Frantischek

Hi,
thanks for the answers.


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?


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.


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


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.

olikraus

Quote
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

Frantischek


Quote
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"

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 ?

The rar file on this page contains code for it.
http://www.wide.hk/products.php?product=I2C-0.96%22-OLED-display-module-%28-compatible-Arduino-%29
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

Frantischek


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.


The rar file on this page contains code for it.
http://www.wide.hk/products.php?product=I2C-0.96%22-OLED-display-module-%28-compatible-Arduino-%29
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

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

Caltoa

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

olikraus

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

Oliver

Frantischek

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

Caltoa


Frantischek

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

olikraus

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

Go Up