Go Down

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

MAS3

I agree that this forms a solution and that one can use the display ans U8glib as is from now on.
But i really like it when things like these can be solved, and with the example i have here, this can be solved.
You might very well be right that reducing production cost has lead to allowing just inbound data for this module.

The signals on these pins 19 and 20 are data in for pin 19 and data out for 20.
If you connect pins 19 and 20 by shorting them with some solder, you will have 2 direction I2C from the display.
This is an easy job because those pins are close enough to each other, but a magnifying glass might come in handy.
I can't tell whether the module will prohibit 2 way communication or not.
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

#31
Mar 09, 2014, 03:30 pm Last Edit: Mar 09, 2014, 03:40 pm by olikraus Reason: 1
Ok, i learned something new today. I did a review of section 8.1.5 of the datasheet of the SSD1306. It might be indeed a good technical solution to tie SDA_in and SDA_out togetner.
The main problem what i see here is this: How do we know that SDA_in and SDA_out are exactly at signals 19 and 20 of the display flex connector. This might be true for a specific OLED display, but unless we have a reliable specification of the OLED itself, there is a high risk of destroying the display. Reverse engineering of the PCB might help, but could also fail, for example if the SDA_out is not available at all on the flex connector.

Oliver

Edit:
@MAS3: Also read previous comments from you, guess i missed/missunderstund some of your remarks. Karma+.



Hi

I have received the display. Indeed, it does not send the I2C ACK bit. I have updateded U8glib (see attached prerelease). Now U8glib works with this nice little display.

Oliver

Edit: U8glib constructor is (Arduino Uno only): U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NO_ACK)


Thanks Oliver, I just received this nice display from ebay and I was searching a lot for a decent libary. The orginal isn't so extended as your U8GLIB. realy realy good job with this! your pre-release 1.16 in this post workes perfect at my arduino uno. (but you have to power toggle the UNO after the upload.. else you get strange images)





Thank you for this pre-release.
It work fine with the blue/yellow oled:


olikraus

@emmaanuel
@nightcrawler28

Thanks for the feedback and the pictures.

Oliver

Hi,
Many thanks Oliver for posting the updated U8glib library here.
I also bought one of these cheap OLED's from eBay (different seller) and the U8glib in this thread has worked first time for me.
Thanks again.

Greg in Oz

olikraus

Good to read that it is usefull.

Oliver

FlyAndy

I also purchased a cheap display from ebay:
http://www.ebay.com.au/itm/310909052356

I was able to get u8glib working using your most recent v1.16, with the new constructor (U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NO_ACK) )
However, the image on the display is very dim compared to the other code (IIC_without_ACK) attached earlier in this thread
I have tried adjusting the contrast register to 0x81, 0xff - but I see no change in the brightness of the display.

Comparing the initialization code in the two pieces of code, they are very similar - so I cant see why there is the difference in brightness.

Does anyone have any other suggestions?

olikraus

If you say similar, what are the actual differences? Maybe you can put the init code of the other code here.

Oliver

elecopper

Great work getting these displays to work!
I just bought 2 and have had no problems with them, they're great for the price.

I am now trying to get both displays to work at the same time and display different things.
I'm a little confused as to how to address them and I'm not sure whether it's possible with this display since it sends no acknowledge.

On the back of the displays there is a jumper to select between two addresses 0x7A and 0x78. So I was going to swap one of these jumpers over, but then how do I get this to work with U8glib?

Sorry for my lack of knowledge, this is my first time using displays and U8glib.

olikraus

SSD1306 I2C address:

In the utility folder you will find the file "u8g_com_arduino_ssd_i2c.c". In line 57 you will see:
Code: [Select]

#define I2C_SLA (0x3c*2)

Change this to 0x03d*2 (or 0x07a). You could also change this macro a global variable:
Code: [Select]

uint8_t I2C_SLA = 0x3c*2;

Then add to your .ino file:
extern uint8_t I2C_SLA;

Now you can change between the displays by assigning the address to this global variable.
Code: [Select]
I2C_SLA = 0x078;   // first display
I2C_SLA = 0x07a;   // second display


ok, not tested, but i think it should work.

Oliver


elecopper

Worked perfectly! They're running very nicely together now :)

Thanks very much Oliver


neepie

Hello there!

I've been trying to get this working http://www.ebay.co.uk/itm/261433793901.

Seems to be about the same display someone else is talking too? With the heltec.cn text.
So i think its the same display as on previous posts.

Luckily i read this and found the newer U8Glib with the "U8G_I2C_OPT_NO_ACK"

I tried it but still my screen has nothing on it. Im using 4.7k pullups.

All i can think of that this display has "address select" telling me its 0x78. How or where do i tell the library it? Im guessing the
u8g_com_arduino_ssd_i2c.c file but how?

pic from behind:


olikraus


Go Up