Skip to content
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

ST7789 on 16b parallel ESP32-S3 #291

Closed
jonsmirl opened this issue Oct 11, 2022 · 22 comments
Closed

ST7789 on 16b parallel ESP32-S3 #291

jonsmirl opened this issue Oct 11, 2022 · 22 comments
Labels
device support request Add new device driver stale Inactive issues

Comments

@jonsmirl
Copy link

I have a 16b parallel ST7789 panel hooked up to an ESP32-S3 but it doesn't display anything. The driver for the ST7789 does not appear to be fully completed. I also have a ILI948x hooked up to ESP32-S3 16b parallel which does work.

What changes are needed in the ST7789 driver to make it work with 16b parallel? Do I need to implement getMadCtl() or setColorDepth_impl()?

@jonsmirl jonsmirl added the device support request Add new device driver label Oct 11, 2022
@lovyan03
Copy link
Owner

The ST7789 parallel should work.
You may have the wrong configuration.

@jonsmirl
Copy link
Author

jonsmirl commented Oct 11, 2022

How do you set in the panel dimensions? Mine is 240 x 320.

Is this correct?

       _cfg.panel_height = _cfg.memory_height = 320;
+      _cfg.memory_width  = _cfg.panel_width  = 240;

@lovyan03
Copy link
Owner

それは正しいですが、画面に何も表示されないのであれば、問題は別にあります。

@jonsmirl
Copy link
Author

We put a scope on it and none of the signals are changing -- RD, WR, CS, DC all high. None of the data lines are changing. It is like the scan out process never got started.

I started off from this demo:
https://github.com/radiosound-com/makerfabs-parallel-tft-lvgl-lgfx
https://www.youtube.com/watch?v=ZWtTmmne6Bo
That board is ESP32-S3 with 16b parallel ILI948x.
The board we are building is ESP32-S3 with 16b parallel ST7789

I then modified that code with these two small patches to adjust for the pinout of PCB and ST7789.
jds_patch.zip

@lovyan03
Copy link
Owner

そもそも信号が出力されないのであれば、パネルの種類が何であるかは関係がありません。
ボードが壊れているか、プログラムが起動していない可能性はないですか?

問題を再現できる最小のコードを提示してください。
私に他人のコードの差分を読むために無駄な時間を使わせないでください。

@jonsmirl
Copy link
Author

jonsmirl commented Oct 27, 2022 via email

@sukesh-ak
Copy link

@jonsmirl
Copy link
Author

jonsmirl commented Oct 27, 2022 via email

@lovyan03
Copy link
Owner

We put a scope on it and none of the signals are changing -- RD, WR, CS, DC all high. None of the data lines are changing. It is like the scan out process never got started.

I am asking you to review the settings because you made this statement

@lovyan03
Copy link
Owner

I will not devote my time to you unless you provide concise and sufficient information

@jonsmirl
Copy link
Author

We have all of the signals changing now. I am not being very helpful because the PCB is in China and I am in Boston. They have one in the mail to me but it is not here yet.

Right now I make changes to the code and send it to China and then they try it and tell me it doesn't work. Then I have to guess what is wrong and try again. The manufacturer got tired of doing this and gave the prototype board to the LCD vendor. LCD vendor has not done anything with it yet. We are just trying to get a demo working to ensure PCB is ok before making 100 units.

@jonsmirl
Copy link
Author

I don't believe anything is seriously wrong with the code, they is just some minor initialization bit which is wrong.

For example I think the CS is inverted for the panel, so I inverted it. That did not get the panel going. Next I tried messing around with the initialization commands to the panel.

The LCD vendor gave us this working code for STM32 and ST7789 in parallel mode. I tried copying the panel initialization out of it but that did not work.
https://drive.google.com/file/d/1TfI27JAXaW10xw7ZKdARDKgKRqGLr2R_/view?usp=share_link

@sukesh-ak
Copy link

@jonsmirl
You need to get a prototype board and test it yourself. Currently you are shooting in the dark here unfortunately.

@lovyan03
Copy link
Owner

lovyan03 commented Nov 1, 2022

One of my biggest pet peeves in this world is being asked to mediate questions in hearsay form.

When you are able to verify the configuration yourself using the breakout board, please ask the question again.

@jonsmirl
Copy link
Author

jonsmirl commented Nov 1, 2022

Still in the mail coming from China.

@lovyan03
Copy link
Owner

lovyan03 commented Nov 1, 2022

You first stated that "ILI948x worked".
Is the hardware you used for testing then the same as this one?
I suggest you connect the DevKit to the LCD breakout board with a jumper wire to see if it works

@jonsmirl
Copy link
Author

jonsmirl commented Nov 1, 2022

I have one of these:
https://www.makerfabs.com/esp32-s3-parallel-tft-with-touch-ili9488.html

The LCD connector on the makerfab board is incompatible with my ST7789 (50p vs 40p). So we had a new PCB is made for the ST7789 LCD. We need to use this LCD specifically due to mechanical constraints. I tried to build a working S3 image for the ST7789 here in Boston. I have S3 board, just no way to attach it to LCD panel. I put scope on all of the lines and they look ok. I then sent that image to China and they loaded it on the board. China reports that the signals are on the LCD pins and the backlight is working but nothing on LCD.

I tried inverting CS which did not help. I tried adding in some different panel init, did not work. So now new PCB is on the way to me. When it gets here I can put logic analyzer on it and likely see what problem is. Hopefully, since I am SW person, not HW.

I do have some of the LCDs and I have S3 modules. I could trying ordering a LCD breakout board and see how far I can get. I did not try that earlier because I am not certain if I can get the LCD out of the housing without breaking it. And it needs to be out of the housing to access the FPC cable. They are sending me panels in the mail which are not in the housing.

@lovyan03
Copy link
Owner

lovyan03 commented Nov 1, 2022

つまりあなたは問題の原因がハードなのかソフトなのか確かめる前に、ソフトウェアを疑った上、私にデバッグ作業を強制しようとしたんですよね?
不具合の証拠を集めるのはお前の仕事です。現時点で私があなたに協力する理由はなにもない。

@JohnTaipei
Copy link

JohnTaipei commented Nov 7, 2022

my pcb
esp32-s3 + lovyangfx + st7789 16-bits mode
works fine

do you use 40 pins FPC st7789 lcd?

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Inactive issues label Dec 24, 2022
@github-actions
Copy link

This issue has been automatically closed because it has not had recent activity. Thank you for your contributions.

@jonsmirl
Copy link
Author

If someone comes across this in the future....

The people designing this ST7789 board were new to LCDs. The reason why this did not work was because the LCD was wired into parallel 8080 mode instead of RGB mode. The software people were unaware of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
device support request Add new device driver stale Inactive issues
Projects
None yet
Development

No branches or pull requests

4 participants