Arduino Forum upgrade scheduled for Monday, October 20th, 11am-4pm (CEST). Sorry for the inconvenience!
Pages: [1] 2 3 ... 5   Go Down
Author Topic: Problem with SSD1306 LCD and U8glib  (Read 10579 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Thanks and regards,
F.

Edit: I think this is the wrong board. Sorry....
« Last Edit: February 19, 2014, 04:00:58 pm by Frantischek » Logged

The Netherlands
Offline Offline
Edison Member
*
Karma: 52
Posts: 1756
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: February 19, 2014, 04:43:38 pm by MAS3 » Logged

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

Germany
Offline Offline
Edison Member
*
Karma: 137
Posts: 1569
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Oliver
Logged

Offline Offline
Edison Member
*
Karma: 36
Posts: 1219
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. smiley-sad

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.
Logged

Germany
Offline Offline
Edison Member
*
Karma: 137
Posts: 1569
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Edison Member
*
Karma: 36
Posts: 1219
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 :-(
Logged

Offline Offline
Edison Member
*
Karma: 36
Posts: 1219
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Germany
Offline Offline
Edison Member
*
Karma: 137
Posts: 1569
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Oliver
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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


* IMG_1997.jpg (1918.43 KB, 2448x3264 - viewed 282 times.)

* IMG_1998.jpg (2006.22 KB, 3264x2448 - viewed 246 times.)
Logged

Offline Offline
Edison Member
*
Karma: 36
Posts: 1219
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Wiring seems okay.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Germany
Offline Offline
Edison Member
*
Karma: 137
Posts: 1569
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1] 2 3 ... 5   Go Up
Arduino Forum upgrade scheduled for Monday, October 20th, 11am-4pm (CEST). Sorry for the inconvenience!
Jump to: