-
Notifications
You must be signed in to change notification settings - Fork 211
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
Introduce RGB/DPI driver #2415
base: main
Are you sure you want to change the base?
Introduce RGB/DPI driver #2415
Conversation
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.
Great to see this PR, I was considering working on this need.
@@ -71,6 +71,10 @@ harness = false | |||
name = "i2s" | |||
harness = false | |||
|
|||
[[test]] | |||
name = "lcd_cam" |
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.
shouldn't that be "lcd_cam_dpi" to match the format of "lcd_cam_i8080" below?
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 choose to skip the suffix as I'm testing both the camera and the DPI drivers in the same test.
I've tested this on a 7" with an EK9716 display controller, and it appears to be working. Board used: https://www.aliexpress.com/item/1005005560920555.html I've not done any kind of exhaustive tests - just run the lcd_dpi.rs from the example directories (with pins modified for the above board). The example code results in the screen going through various colors. On my device, it appears to flicker fairly intensely. Changing the clock to 40 & 50 Mhz seems to help with the flicker a bit. Using 33 Mhz results in interesting artifacts on 2/3 of the display. In any case, this MR has my vote! Getting this into main would be a tremendous step forward! |
Curious, in addition to the pins, did you also update the frame timings? |
please forgive the horrible video and my silly commentary (also, apologies for using YouTube) - https://www.youtube.com/shorts/tHPwoWvb11o Also, I had to turn on the backlight to actually see the screen. The flicker could be from the backlight, or not using ledc to dim it... or, or or ... I confess, I'm so new to rust, I'm still fighting with the borrow checker, but I am excited as can be to get this working! |
I suppose it can't be helped for this example since every single frame is a different color. Trying to see it on video was a lost cause to begin with haha. Would need a different example, one that alternates between two colors once a second.
This is where I need to write some documentation.
I'm glad this helped! Just to be sure about the flickering, try changing the example to only draw on color and see if it still flickers. dpi.send(false, dma_buf).map_err(|e| e.0).unwrap(); to this dpi.send(true, dma_buf).map_err(|e| e.0).unwrap(); |
I can add to the review that I've tried this on the 4.3" cheap yellow board, at 800x480, and it looks wonderful. The 4.3" uses a ST7262. The "flicker" i'd reported is definitely not flicker, but the backlight being a bit over-powered. |
Thank you for your contribution!
We appreciate the time and effort you've put into this pull request.
To help us review it efficiently, please ensure you've gone through the following checklist:
Submission Checklist 📝
cargo xtask fmt-packages
command to ensure that all changed code is formatted correctly.CHANGELOG.md
in the proper section.Extra:
Pull Request Details 📖
Description
Add a driver for the RGB mode of the LCD_CAM peripheral. Closes #2081.
I've called it
Dpi
sinceRgb
is a generic name (though I don't mind renaming it if anyone insists). TheI8080
driver has similar opinionated name.I still need to write some more docs (which may involve diagrams if I can be bothered), which is why this is still draft.
I've opened this early as a formal request for one of the maintainers to acquire a devkit that can run the example.
Makerfabs MaTouch_ESP32-S3 Parallel TFT with Touch 4.3"
(I tried using the espressif devkit linked in the issue but the initialization code is buried deep in esp-bsp and it would complicate the example with bitbanging SPI over an I2C gpio expander)
Testing
HIL test and example