olikraus / u8g2

U8glib library for monochrome displays, version 2
Other
5.21k stars 1.06k forks source link

Compatibility Issue: U8g2 with BigTreeTech TFT35 3.0 (ST7920 Emulation) #2381

Open jeanroukas opened 9 months ago

jeanroukas commented 9 months ago

I am encountering an issue using the U8g2 library with a BigTreeTech TFT35 3.0 display that emulates a ST7920. While this setup functioned without problems in Marlin 2.x, U8g2 appears to have difficulties working with the emulated display.

Details:

Hardware:

Capture d'écran 2024-02-26 150002

pinout

Capture d'écran 2024-02-26 150345

Troubleshooting Steps:

Potential Reference:

Additional Information:

There is a possibility that the issue is related to the state of the CS pin (high or low), which might require specific hardware control. Additionally, data preparation and synchronization might also play a role.

While I lack C++ programming knowledge, I am eager to contribute in any way possible to find a solution for this compatibility issue.

olikraus commented 9 months ago

Difficult... many different issues might cause the system not to work as expected. Step by step isolation of those root causes is probably required.

jeanroukas commented 9 months ago

I want to express my sincere appreciation for your responsiveness. I understand that isolating the problem can be challenging, especially given the intricate nature of the U8g2 codebase.

While I possess limited expertise in this area, I'm determined to do my part in troubleshooting. However, I'm currently unsure about the most effective approach to navigate the U8g2 code.

I would be immensely grateful if you could offer any guidance on how I can best contribute to the investigation. Perhaps you could suggest some initial steps or areas within the U8g2 files that might be relevant to explore.

Thank you once again for your time and consideration. I eagerly await any suggestions you might have, and I remain committed to aiding in resolving this compatibility issue.

olikraus commented 9 months ago

I suggest to setup a working test environment: Maybe a ATMEGA board with EXP1 expander, then connect an original ST7920 display to it and create some test software which works. Basically like this: https://www.youtube.com/watch?v=4CD8ERaylmY but with u8g2 instead of u8glib

After this, we know that everything works and we can plug in the BugTreeTech display and see what happens.

jeanroukas commented 9 months ago

To further diagnose the problem, I will purchase an actual ST7920 display for direct testing. I'll keep you updated on my progress and any findings.

In the meantime, if anyone has experience using or experimenting U8g2 with Big Tree Tech displaydisplay, please share your insights in this thread.

Thanks,