Image distortion on a 128x32 SSD1306 OLED screen (IDFGH-14007) #14830
Labels
Resolution: Done
Issue is done internally
Status: Done
Issue is done internally
Type: Bug
bugs in IDF
Answers checklist.
IDF version.
ESP-IDF 5.3.1
Espressif SoC revision.
ESP32
Operating System used.
Windows
How did you build your project?
VS Code IDE
If you are using Windows, please specify command line type.
None
Development Kit.
MH-ET minikit
Power Supply used.
USB
What is the expected behavior?
Display images on my OLED display
What is the actual behavior?
Images look distorted
Steps to reproduce.
I have an I²C controlled SSD1306 OLED display with 128x32 pixels.
I tried to get the /peripherals/lcd/i2c_oled/main/i2c_oled_example_main.c example working, but images are distorted and screen updates were very slow. It appeared from the logfile that the I²C clock frequency was too high, and I could not manage to get the clock frequency down. By switching back to the legacy I²C driver, I managed to get the clock frequency at 400.000 Hz as specified in the SSD1306 datasheet. I also tried lower frequencies to no avail.
I also switched back to a more basic example without LVGL: ../components/esp_lcd/test_apps/i2c_lcd/main/test_i2c_lcd_panel.c
When using the
function, images still look distorted.
esp_lcd_panel_draw_bitmap()
I modified the test program to clearify the type of distortions:
The aim of the example is to draw 8x8 bitmaps showing a cross-hair driven by the i and j parameters. The example loops i and j from 0 to 7 with short time intervals, and waits longer when the loops are repeated.
The overall screen looks like this:
Since 16 bitmaps fit horizontally and 8 bitmaps fit vertically, it appears the bitmaps are 8 pixels wide and 4 pixels high.
Each bitmap progresses like this as parameters i and j are looped:
The bitmaps are compressed to a 8x4 bitmap, odd rows are shown and even rows are skipped.
I tried modifying the following parameters:
c .control_phase_bytes = 1, // According to SSD1306 datasheet .dc_bit_offset = 6, // According to SSD1306 datasheet .lcd_cmd_bits = 8, // According to SSD1306 datasheet .lcd_param_bits = 8, // According to SSD1306 datasheet
but no variations produced better results. I also changed vertical resolution of the screen (32 or 64 pixels), but this does not make a difference.
Help is appreciated.
Debug Logs.
More Information.
The hardware is working well when using the U8G2 driver in the Arduino programming environment, so I suspect something is wrong with the driver settings.
The text was updated successfully, but these errors were encountered: