-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix display init sequence for Lilygo T-Display rp2040 and add missing 8 pins #8772
Conversation
See pull request pidcodes/pidcodes.github.com#827 The original values from @erongd in https://github.com/erongd/circuitpython/blob/lilygo_t_display_rp2040/ports/raspberrypi/boards/lilygo_t_display_rp2040/mpconfigboard.mk point to a T-Display with esp32 (VID 0x303A is for espressif) but this board uses a raspberry pico (VID 0x2E8A) but it has not been granted for this product a PID. The pid.codes is a workaround
…28, 29 https://github.com/erongd/circuitpython/blob/lilygo_t_display_rp2040/ports/raspberrypi/boards/lilygo_t_display_rp2040/pins.c with errors in GPIO2, BUTTON_R and VOLTAGE_MONITOR and some pins missing
Update changes of the last month for new hardware models
Lilygo t display rp2040
The following 10 exposed pins were missing: 17 18 19 20 23 24 25 LED (26 - is VOLTAGE_MONITOR) 27 28 29
The auto brightness setting caused a slow refresh rate below 1 Hz and a pixel noise error of one pixel height below the display. Removing this line fixed this issue. Further the init sequence from the Adafruit Feather esp32s3 tft was copied over with _MADCTL 0x36, 1, 0x68 and adjusted column and row start. The rotation is now 0 so the display is refreshed from top to bottom.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, no HW for testing.
90, // rotation | ||
40, // column start | ||
53, // row start | ||
0, // rotation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Configurations which have a "0 degree" rotation of the displayio display are almost always preferable.
@@ -116,13 +116,13 @@ static void display_init(void) { | |||
&pin_GPIO4, // backlight pin | |||
NO_BRIGHTNESS_COMMAND, | |||
1.0f, // brightness (ignored) | |||
false, // auto_brightness |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised the display worked at all with the argument positions shifted like this!
The initial setting was RGB and is used for the T-Display ESP32 as well.
Sorry, not dismissed. But I found one error that was not obvious with B/W text but with the use of color. The D3 bit of MADCTL changes the color information. It was initially zero and therefore RGB but with the change to |
Sorry, my mistake. The correct value for MADCTL is
Now I have to find a way to retract my last commit. It looks like general consensus to have
|
This reverts commit 4165a3c.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the extended testing.
The init sequence in board.c had one additional
auto_brightness
setting in thecommon_hal_busdisplay_busdisplay_construct()
of thedisplay_init()
function that caused a one pixel noise line at the bottom of the display and a slow refresh rate from below 1 Hertz. Described in #8765Removing this line solved the issue.
Furthermore the init sequence from the Adafruit Feather esp32s3 tft was copied to rotate the refresh of the display to "top to bottom" and have a final
rotation=0
setting.And the 8 missing pins in the
pins.c
were added.