Chat freely about anything...

User avatar
By leo312
#66720 Hi,

I'm using an ESP-09 with a 1.3" SH1106 OLED display. I use the library from https://github.com/squix78/esp8266-oled-ssd1306 with the header file "SH1106Brzo.h".

Problem is, the columns shift randomly like in the attachment, every time i connect the PCB to the power supply. The shift only occurs, when the PCB is disconnected more than 20 sec and replugged due to a 100uF Capacitor in VCC line.

I think this may have something to do with the initialisation file "OLEDDisplay.cpp"
Code: Select all sendCommand(DISPLAYOFF);
  sendCommand(SETDISPLAYCLOCKDIV);
  sendCommand(0xF0); // Increase speed of the display max ~96Hz
  sendCommand(SETMULTIPLEX);
  sendCommand(0x3F);
  sendCommand(SETDISPLAYOFFSET);
  sendCommand(0x00);
  sendCommand(SETSTARTLINE);
  sendCommand(CHARGEPUMP);
  sendCommand(0x14);
  sendCommand(MEMORYMODE);
  sendCommand(0x00);
  sendCommand(SEGREMAP);
  sendCommand(COMSCANINC);
  sendCommand(SETCOMPINS);
  sendCommand(0x12);
  sendCommand(SETCONTRAST);
  sendCommand(0xCF);
  sendCommand(SETPRECHARGE);
  sendCommand(0xF1);
  sendCommand(DISPLAYALLON_RESUME);
  sendCommand(NORMALDISPLAY);
  sendCommand(0x2e);            // stop scroll
  sendCommand(DISPLAYON);

This is actually provided with the library. Does it miss something, that has to be set?
Attachments
IMG_3781.JPG