Welcome! Log In Create A New Profile

Advanced

DIY Tiny OLED I2C full graphics controller

Posted by enif 
Re: DIY Tiny OLED I2C full graphics controller
July 30, 2020 03:02PM
Thank you, it worked
Re: DIY Tiny OLED I2C full graphics controller
August 10, 2020 03:44PM
Quote
enif
@ Johetan:

When trying to make my Tiny OLED work under Marlin 2.0.5.3 with the BigTreeTech BTT SKR V1.4, I ran into the same problem as you with that shifted display. I also tried all kind of remedies, such as the ones you tried as well, but with no success...

Finally I looking at the file Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_hw_i2c.cp, I saw that there were some commented out statements, which looked as if the developer left them in, not being sure that they should really be removed... So I decommented them, recompiled and uploaded. It's now already a few hours running - and so far no shift in the OLED display :-)

Here are the changes I made in Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_hw_i2c.cp,:
85,86c85,86
< //#define I2C_CMD_MODE  0x080
< #define I2C_CMD_MODE    0x000
---
> #define I2C_CMD_MODE  0x080
> //#define I2C_CMD_MODE    0x000
137c137
<       //u8g->pin_list[U8G_PI_SET_A0] = 1;
---
>       u8g->pin_list[U8G_PI_SET_A0] = 1;
147c147
<       // u8g_i2c_stop();
---
>       u8g_i2c_stop();
151c151
<         //u8g->pin_list[U8G_PI_SET_A0] = 1;
---
>         u8g->pin_list[U8G_PI_SET_A0] = 1;
166c166
<       // u8g_i2c_stop();
---
>       u8g_i2c_stop();
170c170
<         //u8g->pin_list[U8G_PI_SET_A0] = 1;
---
>         u8g->pin_list[U8G_PI_SET_A0] = 1;
184c184
<       // u8g_i2c_stop();
---
>       u8g_i2c_stop();

Let's see if this really solves the problem for good...

I'm using an SSD1306 based OLED on an SKR 1.4 Turbo.. unfortunately, I get the line shifting too, and making these changes doesn't make any difference. Has anyone found a fix yet?

Edit: I found this: [www.reddit.com]
Not really a solution, but it explains why it happens, at least..

Edited 1 time(s). Last edit at 08/10/2020 04:06PM by Arakon.
Re: DIY Tiny OLED I2C full graphics controller
August 11, 2020 12:27PM
Well, here's mine. I *think* I managed to fix it by adding a 4.7kohm resistor to both SDA and SCL to VCC.. at least, the issue has not returned since.


Edit: Nope.. once the steppers run, it slips again.

Edited 1 time(s). Last edit at 08/11/2020 01:24PM by Arakon.
Re: DIY Tiny OLED I2C full graphics controller
November 24, 2020 10:05PM
Hi,

I'm experiencing weird issues with OLED displays on a brand new SKR 1.4 Turbo. I tested with two OLEDs (0.96 and 1.3) and a rotary encoder. These parts are known good. I played a lot with them, developping my own menu library for Arduino.

With the 0.96", the display is perfect. With the 1.3", I get the "shift bug". As far as I know, these modules have pullups on SCK and SDA. Never had such a problem with Arduinos and STM32s using u8_glib and u8_glib2 with OLEDs.

Other issue : the encoder does nothing. It is connected as it has to be, but nothing. No menu. I use the pins 2 & 9 on EXP1 (=GND & 0.28), and 2, 6 & 8 on EXP2 (= GND, 3.25 & 3.26). These pins are defined by default in pins_BTT_SKR_V_1.4.h :

#define BTN_ENC                        EXPA1_09_PIN  // (58) open-drain
#define BTN_EN1                        EXPA2_08_PIN  // (31) J3-2 & AUX-4
#define BTN_EN2                        EXPA2_06_PIN  // (33) J3-4 & AUX-4

EXPA1_09_PIN == P0_28
EXPA2_08_PIN == P3_26
EXPA2_06_PIN == P3_25

(according to Intellisense in VSCode)

I configured Marlin with just "#define U8GLIB_SSD1306", and got it to show on the OLED (perfect on the 0.96", shifted on the 1.3). CouId there be some timing issues ?

No idea what parameters to play with, I2C or encoder.

t seems the OP's work has been pulled (?).

I'm missing something, but I can't figure...

New fact : even the 0.96" shifts, but not at boot time.



[EDIT] ***STUPID ME*** : OLED_PANEL_TINYBOY...

Edited 1 time(s). Last edit at 11/25/2020 01:45PM by yet-another-average-joe.
Re: DIY Tiny OLED I2C full graphics controller
December 03, 2020 08:43PM
Issues (vertical shifting and crashing) are solved on my side by slowing down I2C to 100kHz instead of 400kHz (default in u8glib).

Just remove the option U8G_I2C_OPT_FAST (where ? depends on the display)

Horizontal shifting is simply related with the OLED. The 1.30" is a SH_1106, not a SSD1306.

Edited 1 time(s). Last edit at 12/03/2020 08:43PM by yet-another-average-joe.
Re: DIY Tiny OLED I2C full graphics controller
December 14, 2020 11:43PM
Over the weekend i cobbled my own controller with an sh1106 1.3" display based on diagrams and information here. Will be using it with an skr 1.3

I'm using marlin 2.0.7.2 and noted the OLED_PANEL_TINYBOY2, which works except for it is for ssd1306. Pretty sure i made the correct change in the u8g conditionals for that.

I'm unsure where to remove U8G_I2C_OPT_FAST?

Edit: Do not edit the u8g conditionals. Just #define U8GLIB_SH1106 instead of OLED_PANEL_TINYBOY2

Edited 1 time(s). Last edit at 12/16/2020 12:29AM by Timpanogos Slim.
Re: DIY Tiny OLED I2C full graphics controller
December 17, 2020 10:56PM
Oh i see. In the appropriate section of ultralcd_DOGM.h, change "#define U8G_PARAM (U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST)" to #define U8G_PARAM (U8G_I2C_OPT_NONE)"
Re: DIY Tiny OLED I2C full graphics controller
January 03, 2021 09:07PM
FYI, my SKR 1.4 crashes randomly without U8G_I2C_OPT_FAST and of course shifts the display with it.

This turns out to be a known issue in marlin with no resolution in sight.

[github.com]
Re: DIY Tiny OLED I2C full graphics controller
February 05, 2021 03:31PM
Hello. help me please. I have assembled the display and am unable to apply the patch to my configuration. Here is my machine configuration. Thanks
Attachments:
open | download - Configuration.h (56.5 KB)
Re: DIY Tiny OLED I2C full graphics controller
February 05, 2021 04:59PM
Quote
OSSSA
Hello. help me please. I have assembled the display and am unable to apply the patch to my configuration. Here is my machine configuration. Thanks

Good grief. Why are you using marlin 1.x in 2021?

Don't. Download marlin 2.0, transcribe your configuration file to the new version, compile that. No patch needed.
Re: DIY Tiny OLED I2C full graphics controller
February 09, 2021 04:24AM
Quote
OSSSA
Hello. help me please. I have assembled the display and am unable to apply the patch to my configuration. Here is my machine configuration. Thanks

I don't know what patch you applied and to which version of Marlin, and I can't find any trace of my patches in your Configuration.h. A good point to start if using Marlin 1.1 is here.
Re: DIY Tiny OLED I2C full graphics controller
February 11, 2021 10:15PM
Has anyone tried this on a Creality 4.2.2 board that comes by default on the new Ender3s? I've messed up the lcd trying to explore a color change, and this looks like a great option to build.


EDIT
I figured out the pin layout of the lcd cable after a lot of fiddling, and was able to make the display work with Klipper firmware's software SPI. I'll try and get it to work with Marlin, but I don't have high hopes there.

Edited 1 time(s). Last edit at 02/12/2021 04:52AM by properlypurple.
Attachments:
open | download - Untitled Diagram.png (4 KB)
Re: DIY Tiny OLED I2C full graphics controller
February 11, 2021 10:51PM
Quote
properlypurple
Has anyone tried this on a Creality 4.2.2 board that comes by default on the new Ender3s? I've messed up the lcd trying to explore a color change, and this looks like a great option to build.

The trick is that you would have to find one of the i2c busses on that stm32f1 exposed to a pin header.

You could build the spi version and connect it to the existing header, maybe with soft spi enabled? not sure.
Re: DIY Tiny OLED I2C full graphics controller
February 12, 2021 04:54AM
Quote
Timpanogos Slim
Quote
properlypurple
Has anyone tried this on a Creality 4.2.2 board that comes by default on the new Ender3s? I've messed up the lcd trying to explore a color change, and this looks like a great option to build.

The trick is that you would have to find one of the i2c busses on that stm32f1 exposed to a pin header.

You could build the spi version and connect it to the existing header, maybe with soft spi enabled? not sure.

Thank you! I got the SPI version working with Klipper. Gonna try Marlin now.
Sorry, only registered users may post in this forum.

Click here to login