Hello, thank you for reading into my post.
I am trying to get a 128x128 pixel, 1.5 inch OLED display to work. Unfortunatly, it is unresponsive to the scripts I am running, even though these scripts are working with my 128x64 pixel display.
I have altered the constructor to what is suggested on the seller's page, and to what was suggested in other posts.
I am running this on an Arduino Nano Every.
128x64 script:
//@@@@@@@@@@@@@@@@@@@@@@@
//connections: [A4 -> SDA],[A5 -> SCL]
#include <Arduino.h>
#include <U8g2lib.h>
#ifdef U8X8_HAVE_HW_SPI
#include <SPI.h>
#endif
#ifdef U8X8_HAVE_HW_I2C
#include <Wire.h>
#endif
U8G2_SSD1306_128X64_NONAME_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);
void setup(void) {
u8g2.begin();
}
void loop(void) {
u8g2.firstPage();
do {
u8g2.clearBuffer();
u8g2.setFont(u8g2_font_ncenB10_tr);
u8g2.drawStr(5,24,"test1");
u8g2.sendBuffer();
} while (u8g2.nextPage() );
delay(1000);
u8g2.firstPage();
do {
u8g2.clearBuffer();
u8g2.setFont(u8g2_font_ncenB10_tr);
u8g2.drawStr(5,24,"test2");
u8g2.sendBuffer();
} while (u8g2.nextPage() );
delay(1000);
}
For the 128x128 display, I am running the same code, but with the constructor changed to
U8G2_SSD1327_MIDAS_128X128_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);
But the screen does not respond at all, it is completely black. I have ordered two of these screens, and both give the same result.
Do any of you know what the problem might be? Or have any experience with these screens?
Thanks in advance!
You are using a small buffer with U8g2 e.g. 1 constructor.
U8g2 treats this 16-grayscale display as monochrome. So you should have sufficient SRAM on your Every.
I have the same display but I use the grayscale. Ok for black and white photos.
It should work fine with your U8g2 sketch. I will try it on my Every.
David.
Edit. Your sketch works on my display (with the SSD1327 constructor)
david_prentice:
You are using a small buffer with U8g2 e.g. 1 constructor.
U8g2 treats this 16-grayscale display as monochrome. So you should have sufficient SRAM on your Every.
I have the same display but I use the grayscale. Ok for black and white photos.
It should work fine with your U8g2 sketch. I will try it on my Every.
David.
Edit. Your sketch works on my display (with the SSD1327 constructor)
Thank you for testing. That is odd, neither of my displays give any response. Can I ask you what connections you used? Just to make sure I have hooked mine up exactly the same. I am using:
-3.3V to VCC
-GND to GND
-A4 to SDA
-A5 to SCL
The display has a 3.3V regulator. (the chip nearest the GND pin)
Connect VCC to 5V.
unfortunately, there is still no response from the display. I also tried the same script one my Uno R3, but to no avail.
I did notice that when switching the displays with the Arduino powered on, the computer makes the 'disconnected USB sound' when connecting the 128x128 display to it, which does not happen with the 128x64 display. Does this point to some error or short circuit?
To test further, I uploaded this simple counting sketch to the Arduino:
int i = 0;
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.println(i,1);
i++;
delay(1000);
}
When I run it without any display hooked onto it, it keeps on counting when I plug the 128x64 display to the Arduino. But when I plug the 128x128 display in to it, it stops counting and makes a the 'USB disconnected' sound
david_prentice:
The display has a 3.3V regulator. (the chip nearest the GND pin)
Connect VCC to 5V.
I connected the VCC pin to 5V now, but I think this is what actually causes the behavior I described in my previous post. The 'USB disconnected' sound does not appear when connecting the screen to 3.3 V, but does appear when connecting it to 5V.
Furthermore, the counting test behaves the same; no problems when connected to 3.3V, but stops if connected to 5V.
Look at the pcb. The regulator chip is at the top right near the GND terminal pin. Compare your pcb with the images in your link.
There should be an empty footprint to the right of this chip.
Empty for 5V. And a 0R for 3.3V
If your pcb has an 0R mounted, you must connect VCC terminal to 3.3V. The regulator is bypassed.
The display will be damaged by 5V. There will be excessive current. The PC USB will shut down. An external 5V will not shut down.
If the footprint is empty, the regulator chip will operate normally.
David.
Now that I am looking at it, the back of my display actually looks very different from the pictures on the seller's page:

Do you mean the connections labeled as "J1" on my chip? So that would imply that I should be fine when applying 5V to it?
Thank you for looking into this. It is greatly appreciated.
Edit: the image I am trying to insert does not appear to show up in my post. Here is the Imgur link: Imgur: The magic of the Internet
U1 is the regulator. J1 is the "bypass link". Your photo looks like it should work fine at 5V. Slave address = 0x3C.
My display matches the images from the link in your Original Post #0
I can only vouch for my display.
Some other reader might have your display.
It looks as if your pcb has some protection circuitry. Perhaps that is the problem.
If it is unhappy with 5V I would wait for response from other owners.
David.
UPDATE:
I have contacted the seller, which has since replied and offered a solution:
Remove the diodes at ZD1 and ZD2 in the image I have posted previously. This has gotten the display to work properly.
I have no idea why this works though, so if anyone has more information on that, please share.