TFT ili9341 again
Moderators: grovkillen, Stuntteam, TD-er
TFT ili9341 again
I've loaded from the latest release (24 dec 2022) on my ESP8266. I made a custom version because I wanted a combi of NEOPIXEL(Basic) and the TFT display. Connected the ili 9341 according the the plugin095 (SPI active CLK=GPIO-14 (D5), MISO=GPIO-12 (D6), MOSI=GPIO-13 (D7)) . After trying to get some text on my display, I tried the text tft,txtfull,10,50,HelloWorld in Command line on the TOOLS page resulting in an OK on the Command output, but nothing on my display. I notised that the X Y coordinates were changed. After modifying the command line input into tft,txtfull,70,0,HelloWorld the coordinates changed as well so there is some communication from and to the display dut no text.
Replaced the cables already for a new set to rule oud broken cables. Any idea what could cause this problem?
Replaced the cables already for a new set to rule oud broken cables. Any idea what could cause this problem?
Re: TFT ili9341 again
Do you have the backlight powered? Without backlight you can hardly see the pixels (maybe if looking from a very short distance and having enough environment-light). BL can be connected to VCC without issues, for a quick test, and you can also configure a GPIO for it in the plugin so it will be controlled via PWM to the percentage set there.
/Ton (PayPal.me)
Re: TFT ili9341 again
I had to mention that, I have a backlight and a good view on my screen but probably it is better to make connect it as you mentioned so I can PWM dim the backlight.
Re: TFT ili9341 again
The result of PWM the backlight: dimming is working perfect but no charcters on the screen. After sending the TXT, you see a kind of flikkering on the screen but no text
Re: TFT ili9341 again
What pin is used for CS?
NB: the x/y coordinates are set from the plugin, not read from the display hardware. That doesn't report that type of data.
NB: the x/y coordinates are set from the plugin, not read from the display hardware. That doesn't report that type of data.
/Ton (PayPal.me)
Re: TFT ili9341 again
it is pin GPIO 0 (D3)
Re: TFT ili9341 again
Should I ask for the DC and Reset pins? These are also important.
Can you share a screenshot of that part of the plugin settings to show it?
You can also try a different controller model, like the ILI9342, that only uses a somewhat different color mapping config from the ILI9341.
What exact board do you use? Have a link to it?
Does it have a XPT2048 touch screen attached? (but that should work completely independent of the display)
I have my Aliexpress-sourced ILI9341 board connected to an ESP32, and while the wire connections are a bit 'fragile' (I've used extra connectors & wires to also have the touchscreen connected), after moving the contacts a bit it works fine every time I use it for testing an ESPEasy release or plugin fix.
Can you share a screenshot of that part of the plugin settings to show it?
You can also try a different controller model, like the ILI9342, that only uses a somewhat different color mapping config from the ILI9341.
What exact board do you use? Have a link to it?
Does it have a XPT2048 touch screen attached? (but that should work completely independent of the display)
I have my Aliexpress-sourced ILI9341 board connected to an ESP32, and while the wire connections are a bit 'fragile' (I've used extra connectors & wires to also have the touchscreen connected), after moving the contacts a bit it works fine every time I use it for testing an ESPEasy release or plugin fix.
/Ton (PayPal.me)
Re: TFT ili9341 again
Here the screesshot of the Ali display ILI9341.
- Attachments
-
- ili.jpg (211.37 KiB) Viewed 4325 times
Re: TFT ili9341 again
the screenshot of my ESP8266 settings
- Attachments
-
- ili1.jpg (164.69 KiB) Viewed 4323 times
Re: TFT ili9341 again
tested another type of screen from the dropdown in the plugin. No result.
Re: TFT ili9341 again
There's at least one blocking conflict, both the CS and the Backlight use GPIO-0, that will certainly not work as intended. One of those has to be reconfigured, and is most likely the reason the display is not working. The CS signal is crucial in addressing/enabling the commands to reach the display.
/Ton (PayPal.me)
Re: TFT ili9341 again
my mistake, that is the problem with a tunnel view. I'm gone experiment with this display. I see some characters
Re: TFT ili9341 again
Testing the TFT device and try to send a HTTP message from Domoticz to the device but tha is not working for me. The message is simple, if a switch is turned on send the message <myIP>/?cmd=tft,txtfull,100,40,HelloWWWWorld.
Also I try to get a <space> between Hello and World. I tried the following characters where the space is in between The % %, ' ', " ". they all did not work any ideas?
Also I try to get a <space> between Hello and World. I tried the following characters where the space is in between The % %, ' ', " ". they all did not work any ideas?
Re: TFT ili9341 again
As a simple test to see how the data you try to send should be URL-encoded, you can try the command on the tools page.
After entering the command, the page quickly reloads and you can see the URL-encoded call in your browser url field.
There you can see how special characters are encoded.
For example a space (ASCII code 32, hex: 0x20) will be changed into %20
After entering the command, the page quickly reloads and you can see the URL-encoded call in your browser url field.
There you can see how special characters are encoded.
For example a space (ASCII code 32, hex: 0x20) will be changed into %20
Re: TFT ili9341 again
Having spaces or commas in the text to display on the screen, that part of the command has to be quoted, as explained here
So sending Hello world would be like: tft,txtfull,100,40,"Hello world"
So sending Hello world would be like: tft,txtfull,100,40,"Hello world"
/Ton (PayPal.me)
Re: TFT ili9341 again
that works now for me, Good tip. But the second thing is that I try to send an HTTP message from Domoticz to my dislat. I tried <MY IP>/?cmd=tft,txtfull,0,0,"Hello World" also tried the ftfcmd option but that did not work as well. Nothing is seen on my 8266 receiving device log
Re: TFT ili9341 again
I think that should be like:
and optionally using %20 instead of the space
Code: Select all
http://ip.ad.dr.ess/control?cmd=tft,txtfull,0,0,"Hello world"
/Ton (PayPal.me)
Re: TFT ili9341 again
Took some time but the result is <My IP>/tft,txtfull,120,120,"Hello%20World". It looks great for now. I continue for the touch part of the display. Hope it will not be struggle
Re: TFT ili9341 again
I started the touchsreen part of my project. Documentation about XPT2046 is quit strait forward. Everything connected and try to Callibrate according the procedure discribed. I see nothingin my logging at the time I touch the screen. stese are the connections I made for this test . Do I mis something?
- Attachments
-
- capture.png (7.75 KiB) Viewed 4072 times
Re: TFT ili9341 again
Do you share the CS pin with anything else?
Re: TFT ili9341 again
The resistive touchscreen XPT2046 isn't as sensitive as the touchscreen on a smartphone, we've all become accustomed to. Best 'effect' is to be had when applying some pressure and using the (plastic) pen that should accompany the touchscreen, but touching/tapping with a fingernail also works quite ok, though it may be less accurate.
For logging to work, the setting for calibration-log has to be enabled, but I assume you've got that checked (and, it's on by default ).
For logging to work, the setting for calibration-log has to be enabled, but I assume you've got that checked (and, it's on by default ).
Last edited by Ath on 30 Jan 2023, 20:51, edited 1 time in total.
/Ton (PayPal.me)
Re: TFT ili9341 again
I use the Hard Plastic pen for the touch but no result. Also no conflicts with other pins used in my project
- Attachments
-
- Touchpng.png (22.99 KiB) Viewed 4061 times
Re: TFT ili9341 again
No it is still a pain in the .... I bought this screen and the only thing left is perhaps a monday morning screen. Perhaps not working, red the documentation again I followed all the instructions.
Re: TFT ili9341 again
Just for fun I powered up my ESP32 with the ILI9341/XPT2046 touch-display combo, and updated to latest mega branch. Still works like a charm (after wiggling the wires a bit to get it going )
This is some calibration log, without Events enabled, tapping with my fingernail randomly on the screen:
Minimum touch sensitivity is set to 15, not sure what you have set there, when set too low it will trigger a touch when a fly flies by, when set too high, even when hitting it with a hammer you won't see a touch...
This is some calibration log, without Events enabled, tapping with my fingernail randomly on the screen:
Code: Select all
49927 : Info : Touch calibration rx= 1570, ry= 1521; z= 173, x= 1570, y= 1521
52729 : Info : Touch calibration rx= 2081, ry= 2934; z= 212, x= 2081, y= 2934
53329 : Info : Touch calibration rx= 1378, ry= 3403; z= 38, x= 1378, y= 3403
53829 : Info : Touch calibration rx= 1586, ry= 3223; z= 122, x= 1586, y= 3223
55029 : Info : Touch calibration rx= 1333, ry= 3182; z= 114, x= 1333, y= 3182
55530 : Info : Touch calibration rx= 2552, ry= 3396; z= 74, x= 2552, y= 3396
/Ton (PayPal.me)
Re: TFT ili9341 again
I think,only to be be sure, I rewire the ESP and look what happens otherwise I order another so I can compare one with another. Will start with it tomorrow
Re: TFT ili9341 again
I reinstalled all the wires, activated the callibration screen (as discribed) and start testing. I Assumed and expected to see something in my logfile, am I right? If no logging is available for my touch activities,I can assume that the touch part of my ili screen is broken. Can you confirm this conclusion?
Re: TFT ili9341 again
Assuming that you also checked if the wires are not broken in some way (I've had my fair share of broken/disconnected wires & connectors, over time), that sounds like a fair conclusion.
/Ton (PayPal.me)
Re: TFT ili9341 again
I soldered them on a rack so the wired must be good for now. I order a new screen and hope to continue in a few weeks. Thanks for the support.
Re: TFT ili9341 again
Now I found another display, the 9481 but the connections are not the same as the ili 9341. Do you have any idea I must use for my testing the screen and the touch part?
- Attachments
-
- IMG_20230131_185557.jpg (3.6 MiB) Viewed 3926 times
Re: TFT ili9341 again
If it has a touch-screen it should be a XPT2046, AFAIK, so you could hook that up and test, but as the display is supposed to be 320x480 pixels, and possibly the touch screen is also configured like that, and that touch resolution is untested.
The ILI9481 LCD display is untested, as I couldn't find any that actually had the SPI interface, or it is rather undocumented how to connect or configure to use 3/4 wire SPI. You seem to have one available, though .
The ILI9481 LCD display is untested, as I couldn't find any that actually had the SPI interface, or it is rather undocumented how to connect or configure to use 3/4 wire SPI. You seem to have one available, though .
/Ton (PayPal.me)
Re: TFT ili9341 again
Haha, unieke. I am still searching and if any news, I share it
Re: TFT ili9341 again
For what I could find, the pinout should be connected like this:
Only the GND and 3.3V should be used.
The LCD_D0..LCD_D7 pins can be ignored.
Edit:
This may be helpful: https://github.com/Bodmer/TFT_eSPI/issues/968
Code: Select all
Display - ESPEasy
LCD_RST - RST
LCD_CS - CS
LCD_RS - n/a
LCD_WR - MOSI
LCD_RD - CLK
The LCD_D0..LCD_D7 pins can be ignored.
Edit:
This may be helpful: https://github.com/Bodmer/TFT_eSPI/issues/968
/Ton (PayPal.me)
Re: TFT ili9341 again
I found an overview and will test it tomorrow morning.
- Attachments
-
- IMG_20230131_222638.jpg (2.1 MiB) Viewed 3903 times
Re: TFT ili9341 again
Unfortunately no succes in my testing. Tested all 948x types available in the drop-down but no reaction on the screen. Will order a new 9341 because that is a tested one.
Who is online
Users browsing this forum: No registered users and 0 guests