1.3" i2C OLED trouble with Adafruit SSD1306 library

Status
Not open for further replies.

Matadormac

Well-known member
Good day the list.

I have one of those eBay 1.3 inch OLED displays (128 x 64), i2C with no reset pin (seems to have been factory modified as for the Haltec reset fix). I am using a Teensy 3.2 with 4.7K pullup resistors between 3.3v and ACL(19) and SDA(18).

The adafruit SSD1306 128 x 64 i2C sketch (from the Teensy install sketches) initializes the display but all the graphics show only in a bar about 1/5th the display height, at the top of the display. The sketch appears to be running just fine and there are no compiler errors. I am running Arduino 1.6.7 and Teensy loader 1.27 beta2.

None of the U8glib's work for this display.

I have looked through the forum for i2C related display posts and have not found a solution yet.

Thoughts on what I might do next especially if I can somehow fix the Adafruit SSD1306 library or is there another I should try?

Thank you
 
None of the U8glib's work for this display.

I have looked through the forum for i2C related display posts and have not found a solution yet.

fwiw, the u8glib stuff doesn't work (IIRC), simply (mainly?) because there's no i2c code in there (for teensy 3.x); so you'd have to add some stuff: this works for me. there's more details in this thread; that's re SH1106, though should work just as fine with SS D1306
 
Thoughts on what I might do next especially if I can somehow fix the Adafruit SSD1306 library or is there another I should try?

Well... I was always told the difference between the SSD1306 and the SH1106 is the reset pin - if your board doesn't have a reset pin then it is an SH1106.

Anyways I don't know if it will help but I've been using https://github.com/ghztomash/Adafruit_SH1106 with a cheap i2c SH1106 display and the Teensy 3.2. It allowed me to replace the 1.3" 128x64 Adafruit display with a 2.4" OLED I got on eBay.

Regards,

Brad.
 
Hi Brad,

I wondered what the difference was betrween the 1306 and the 1106 versions. I downloaded the suggested library and tried it. Actually, same results as before. The sketch icons are showing in a bar at the top of the display and for only about 1/5th of the display height instead of occupying the whole display so something is still wacky.

Thank you

Mark
 
AFAIK, the major difference has to do with the display RAM (128x32: SSD1306; 132x32: SH1106), which is why SSD drivers will typically be off a few columns when used with SH1106 type displays
 
Ah, just found an URL for my display. http://www.electrodragon.com/product/1-3-12864-blue-oled-display-iicspi/ and it is the I2C version.
In the description they say: Drive IC is SSH1106, easy to find arduino library for it. (Compatible with SSD1306, but display start address at 0x02) RAM of SSH1106 is 132*64, and SS1306 is 128*64

How do I implement their advice to start the display at 0x02? I did note that there was an offset to the left.

Thank you
 
How do I implement their advice to start the display at 0x02? I did note that there was an offset to the left.

Thank you

well, have you tried with u8glib? it has the SH1106 driver and, for all i know, it works (see the "com" function i've linked above).
 
Hi mxxx. Yes, I did try the u8glib. Eventually I worked through all 1306 as well as 1106 just for the "fun" of it! I couldn't find any u8glib which worked for this particular display. The odd thing is that I found a SeedStudio driver which worked to a decent degree but still I think with that annoying off set to the right. Well, that was compensatable by adjusting the x coordinate value up several points.

Thank you
 
Hi mxxx. Yes, I did try the u8glib. Eventually I worked through all 1306 as well as 1106 just for the "fun" of it! I couldn't find any u8glib which worked for this particular display. The odd thing is that I found a SeedStudio driver which worked to a decent degree but still I think with that annoying off set to the right. Well, that was compensatable by adjusting the x coordinate value up several points.

Thank you

Well, all i can say is u8glib works 100% for me with those 4 pin 1"3 OLEDs from ebay, though not out of the box. afaics, the driver isn't the problem, the lack of i2c support for teensy 3.x is (take a look at u8g_com_i2c.c, there's only defines for various AVRs and SAM3X8E). hence the need for the "com" function.
 
Ah, I will go back and work on that. I did read that email thread. I think the download for your two files is no longer working, but I could copy your code from the email thread. Before I do that is there an updated version of your modifications with the "com" function?
Thank you
 
Ah, I will go back and work on that. I did read that email thread. I think the download for your two files is no longer working, but I could copy your code from the email thread. Before I do that is there an updated version of your modifications with the "com" function?
Thank you

Oh, true, that link is dead; but the one further above (in this thread) should be working. ie this one.

here's a test sketch, which works here:

Code:
#include <i2c_t3.h>
#include <u8g_i2c.h>

u8g_t u8g;

void display_something() 
{
  uint16_t y = 0x08+random(55);
  u8g_FirstPage(&u8g);
  do {
    u8g_DrawStr(&u8g, 10, y, "hello hello etc");
  } while(u8g_NextPage(&u8g)); 
} 

void setup(void) 
{  
  delay(100);
  // init display:
  u8g_InitComFn(&u8g, &u8g_dev_sh1106_128x64_2x_i2c, u8g_com_hw_i2c_fn);
  // font , color 
  u8g_SetFont(&u8g, u8g_font_6x12);
  u8g_SetColorIndex(&u8g, 1);
}


uint32_t _time;

void loop(void) 
{  
  _time = micros();
  display_something();
  Serial.println(micros()-_time);
  delay(250);
}


fwiw, IIRC when i poked around on the www, i also came across a library called "OzOled", which worked, though it's fairly basic.
 
Status
Not open for further replies.
Back
Top