Large OLED I2C Display (SSD1309) (CE09964)

This is a placeholder topic for “Large OLED I2C Display (SSD1309)” comments.

Bright, crisp, and easy to use, this 2.42-inch OLED is perfect for projects that need to display anything!

Read more

I’m having trouble with this display, but I see reviews which must indicate some have it working. I am trying to connect it to a seeed xiao nrf52840 sense with a few other i2c devices. I can run a scan sketch and detect a picodev bme280 at 0x77 and a stemmaQT rotary encoder at 0x36, but cannot get anything comms from this display. I’m noting that it says 0x7A and 0x7B on the back, which through a quick google search seems to show that the address is outside the regular i2c range? I’ve also tried a number of generic sketches that use address 0x3C or 0x3D all with no success. I’ve triple checked my wiring and cannot see any issues? I’ve used the pins on the short side. Any guidance would be appreciated.

Did you try address 78 (print sometimes can make B and 8 look the same), on the core image on one I found on aliexpress, both look to be 0x78 could be the default address.

Side note: in I2C any 7 bit address should be valid.

Further info, I am able to detect a 2004 LCD using a simple sketch that scans for all active addresses:


At 7:30 you can see with the alternate screen connected, I detect 0x27. And an example sketch works. The scan at 7:46 with the SSD1309 display connected detects nothing.


I ordered 3 of these, and I’ve tried a second one in case the first was faulty. If I’m missing something obvious, please let me know.

I’m scanning all the way to 7F:

  for (uint8_t addr = 0x08; addr <= 0x7F; addr++) {
    Adafruit_I2CDevice dev = Adafruit_I2CDevice(addr, &Wire);
    if (dev.begin()) {
      Serial.print("Device found at 0x");
      Serial.println(addr, HEX);
      found = true;
    }
  }

Google AI says:

I2C address 0x78 is generally considered a reserved address in the standard 7-bit I2C addressing scheme. While it might be used by some devices, it’s often avoided because it’s part of the range (0x78-0x7F) reserved for 10-bit I2C addressing or other special functions. If you encounter a device claiming to use 0x78, it’s best to verify if it’s using the standard 7-bit addressing or if it’s a 10-bit address or another I2C function

Hi @lwsjss

Welcome to the forum!

Are you able to post the code that you’re using to run the display? This will give us a better idea of what exactly is going on.

Another thing to check would be that the jumper wires you’re using have continuity between both ends.

Hi Dan,

I’ve tried multiple sketches and worked my way back to just searching for the address using this code:

#include <Adafruit_I2CDevice.h>
#include <Wire.h>

void setup() {
  Serial.begin(115200);
  while (!Serial) {
    delay(10);
  }

  Wire.begin();
Serial.println("Starting:");
  bool found = false;
  for (uint8_t addr = 0x08; addr <= 0x7F; addr++) {
    Adafruit_I2CDevice dev = Adafruit_I2CDevice(addr, &Wire);
    if (dev.begin()) {
      Serial.print("Device found at 0x");
      Serial.println(addr, HEX);
      found = true;
    }
  }

  if (!found) {
    // Stay silent
  }
  Serial.println("Done");
}

void loop() {}

I detailed its output in the post above, the display does not respond like other components do. I’ve tried running the test without the other components attached in case there was a clash of addresses, and still nothing. I’m confident that the wiring is correct… I’ve tried it both direct into the bread board, and via the wires pictured above into both the short and long side headers. The cable clearly works as the 2004 has no issues.

As far as getting it to run… I’ve tried multiple online examples, including the below. I’ve tested addresses 3C, 3D, 78, 7A, 7B and all do nothing. I’ve also tried the same with Wire.begin() commented out.

I’m confident now that the issue is something to do with 10 bit i2c addressing, which goes beyond my ability to fault find.

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64

#define OLED_RESET    -1  // Reset pin (not used)
#define SCREEN_ADDRESS 0x3C  // Common I2C address for OLED displays

Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); 

void setup() {
  Serial.begin(115200);
  delay(10000);
  Wire.begin(); 
Serial.println("SSD1306 starting");
  if (!display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS)) {
    Serial.println("SSD1306 not detected! Check wiring.");
    while (true); // Stop execution
  }

  Serial.println("SSD1306 detected!");

  display.clearDisplay();
  display.setTextSize(2);
  display.setTextColor(WHITE);
  display.setCursor(10, 25);
  display.println("Hello, World!");
  display.display();
}

void loop() {
  // Nothing here, text stays on screen
}

Apologies if this is too obvious… but have you stuck a voltmeter on the board to confirm it is actually powered? Or does it have an LED?

I’ve hit issues with other I2C displays if the I2C connector is not making good contact.
Will be interested in the results… I could use one of these in my current project.

Cheers,
T.

1 Like

Not directly, and im away from my desk at the moment, but the same cables were able to power the 2004 LCD without issue. I’ve also had it directly into the bread board, power isnt the issue :frowning:

I have tested for voltage at the pins and it is reading correctly. I’m stumped, it must be something to do with 10 bit addressing.

Maybe, but looking around I dont think so.
I think that maybe its “stating the shifted” address byte.
But you did a full scan and did not find anything. so kinda rules it out as well … mmmm

My thought was more based on
0x78 => 0b01111000
if we right shift we get 0b00111100 => 0x3C
i.e. normally we have our I2c address, (7 bits) and left shift 1 bit as the last bit becomes the R/W bit.

src: http://www.lcdwiki.com/res/MC154GX/1.54inch_OLED_SSD1309_IIC_Module_MC154GX_User_Manual_EN.pdf
while not the same display, its the same driver chip.

Based on the following image the 7 bit address would be 0111100 (0x3C) but before that in the document it was talking about 0x78 as the default address.
Of couse the image example could be wrong, but interesting)

Hi @lwsjss

If you wanted to shoot over an email to our support team on support@coreelectronics.com.au with your order number we can get this sorted out for you.