-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LVGL Font corruption on SSD1306 display (IDFGH-7736) #9277
Comments
Playing with this a bit more, it looks like every other line is missed off everything. Creating a 128x32 text area only puts characters on the top of the screen even when the content scrolls. Expanding it to a 128x64 text box will make it fill the whole screen (as you might see from the pictures above, it's definitely a 128x32 display). |
[edit - I'm not really sure what example code we have run and put together] We see some similar behavior as well when we tried out the i2c bus and choose this display we had used in a previous Raspberry Pie project - https://www.adafruit.com/product/3527 [edit - one pull up resistor was not attached, so my remark on 400kHz was not legit. Now it runs at 400 kHz, but still shows strange things] Is it related to #9209 ? [Edit - the first initial fix in references 9209 does not seem to help. Still strange display.] |
I'm not playing with the I2C interface myself, just using the defaults from the esp-idf demo code, and I'm not seeing any other corruption (well, the cursor does temporarily shave the rightmost pixel off the previous character, but that fixes itself eventually). I have done a simple workaround, which is basically just using fontforge to double the height of the font. Not exactly memory-efficient, but functional. |
Hi,you can add some code in init():
between |
The datasheet describes a longer set of initialization steps. Note: |
@mbelt
|
@yuanyihan Edited previous comment with corrections. |
I mean : We know :
I think esp_lcd_panel_ssd1306.c @ esp-idf's CODE is very obvious. |
@VikOlliver I had the same issue and I did my best to provide the fix: #12450. Thanks @yuanyihan. |
Environment
git describe --tags
to find it): v5.0-dev-3654-gc2ccc383daxtensa-esp32-elf-gcc --version
to find it): 1.22.0-80-g6c4433aProblem Description
Default UNSCII fonts are displayed half height when rendered using the stock example code on a 128x32 SSD1306 monochrome OLED display.
Problem is exhibited by other monospace fonts, but the stock examples are probably better for illustrating the bug.
Expected Behavior
UNSCII 8 font displayed 8 pixels high, UNSCII 16 font displayed 16 pixels high
Actual Behavior
UNSCII 8 font displayed 4 pixels high and completely illegible.
UNSCII 16 font displayed 8 pixels high, 16 pixels wide.
Steps to reproduce
// If possible, attach a picture of your setup/wiring here.
Unable to attach. Github reports "something has gone seriously wrong" when attempting to attach a 294KiB JPEG
Code to reproduce this issue
Stock example.
Debug Logs
No errors logged.
I (388) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (398) example: Initialize I2C bus
I (408) example: Install panel IO
I (408) example: Install SSD1306 panel driver
I (508) example: Initialize LVGL library
I (508) example: Register display driver to LVGL
I (508) example: Install LVGL tick timer
I (508) example: Display LVGL Scroll Text
The text was updated successfully, but these errors were encountered: