MEGA 2560 unable to detect 128x64 Oled, but does detect 128x32

Hi Everyone,

I'm having problems connecting my Mega 2560 to a 128x64 Oled. I have 1x 128x32 which detects and displays fine, but 2x 128x64s that will not detect or display anything.

I've tried scanning for them using a i2C scan sketch, but I just get "No I2C devices found"

Pin 20 - SDA
Pin 21 - SCL
VCC - Hooked to 5v, but I've tried with 3.5v too
GND - GND

Based on various threads, I have also tried 10k and 4.7k pullup resistors between VCC to SDA and VCC to SCL, but no luck.

I bought one of these displays from ebay, assumed it was bad, so I bought another from another seller and a slightly different model. Unfortunately neither works.

Any suggestions for what else to try when stuck at "No I2C devices found"?

thank you
Charlie

Is the Mega I2C 5v or 3.3v? Maybe the display is 3.3v but the Mega needs to be 5v?

I'm not sure. Is there a way to check that ? The board I have is a "keystudio mega 2560 R3"

What are the two display modules? It might be easier to look up their IO voltages and compare for differences.

I don't see much info printed on the actual displays, but here are links to listings. Both list as supporting 3v-5v

The second one is SPI, not I2C. Do you have the original display part number?

What are the SPI pins of Arduino Mega?

Pin connection - Sensors - Arduino Forum

SPI uses the SCK, MOSI, MISO and CS (or SS) pins. Those pins are 52, 51, 50 and 53 (defalut) on a Mega. Those pins are also available on the ICSP connector.Oct 2, 2019

Thank you. Reading about SPI now. Didn't realize I had picked up something different with this 2nd display.

I don't see any model number, but here are pics of the one that is working.


Maybe the 128x64 I2C one is just bad.

Problem solved. First 128x64 was bad. This is what happened...

  1. Bought a 128x64 I2C and it didn't work
  2. Assumed it was bad, so bought another but got an SPI by mistake. This one "didn't work" either because I was hooking it up as I2C
  3. Learned the difference between I2C and SPI after posting here and ordered a new I2C from ebay. I2C #1 was indeed bad.
  4. Hooked up new I2C and it worked perfectly. Just needed to change address to 0x3C

thanks for the help!

Note that OLED has a regulator on the back, that provides the 3.3V the OLED needs.

Some OLEDs have no regulator on the back, these are for 3.3V Arduinos.

Good one is on the left, dead one on the right. I tried both with 5v. Maybe the bad one was really a 3.3v and I just fried it?

One on the left is for 5v

One on the right is for 3.3v

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.