Good morning.
I have a problem using the TFT ILI9341 via SPI. I created a small program in FWC10 to test the TFT, but the result is a blank screen. I did another test with the same program but in FWC8 and here I can already see the text on the screen. I think the problem is with the TFT module in the FWC10, but if anyone can help, I'd be grateful.
Attached I send examples of the programs.
Thanks in advance.
ILI9341 SPI
-
- Posts: 4
- http://meble-kuchenne.info.pl
- Joined: Sat Dec 19, 2020 10:26 am
ILI9341 SPI
- Attachments
-
- exp_FWC10.fcfx
- (16.01 KiB) Downloaded 344 times
-
- exp_FWC8.fcfx
- (8.92 KiB) Downloaded 343 times
-
- Valued Contributor
- Posts: 1012
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 193 times
- Been thanked: 217 times
-
- Matrix Staff
- Posts: 1936
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 506 times
- Been thanked: 688 times
Re: ILI9341 SPI
Hello,
In the Print component macro you have set the font parameter to 1 but this should be 0 as you only have font 0 defined.
Also you print the string right before clearing the display, do you need a delay or something in here to give you time to see the text?
On your blank screen are you getting the background colour? if not what colour are you getting?
Interesting the simulation is working with the program as is. I'll see if we can get this resolved so if the font parameter is >= the number of fonts then we default to font 0. - Edit - Scratch this, the component already does this.
In the Print component macro you have set the font parameter to 1 but this should be 0 as you only have font 0 defined.
Also you print the string right before clearing the display, do you need a delay or something in here to give you time to see the text?
On your blank screen are you getting the background colour? if not what colour are you getting?
Interesting the simulation is working with the program as is. I'll see if we can get this resolved so if the font parameter is >= the number of fonts then we default to font 0. - Edit - Scratch this, the component already does this.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Re: ILI9341 SPI
First of all, I would like to thank stefan.erni and BenR for their availability to help me.
According to the changes proposed by BenR, in debug mode I was able to see the simulation correctly. I recorded the Micro again with the changes but the display still appears blank.
I recorded a video too.
Best Regards.
Flaviae
According to the changes proposed by BenR, in debug mode I was able to see the simulation correctly. I recorded the Micro again with the changes but the display still appears blank.
I recorded a video too.
Best Regards.
Flaviae
- Attachments
-
- Flaviae FWC10.zip
- (3.64 MiB) Downloaded 329 times
-
- exp_FWC10.fcfx
- (16.18 KiB) Downloaded 334 times
-
- Matrix Staff
- Posts: 1936
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 506 times
- Been thanked: 688 times
Re: ILI9341 SPI
Might also be worth doing a one second flasher test to make sure your chip configuration is ok. From the video it looks like it may be running slow and so the 5s delay at the start of your program could be taking a long time to complete?
https://www.flowcode.co.uk/wiki/index.p ... ED_flasher
https://www.flowcode.co.uk/wiki/index.p ... ED_flasher
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Re: ILI9341 SPI
Good afternoon.
Before making the changes you propose, I would like to mention that the 5 seconds at the beginning of the program are only used to wait for the microcontroller to stabilize. To confirm that the program was working, I placed an LED (RE0). After 9 seconds, the LED lights up indicating that the program is in a loop.
Following Ben's suggestion, I created another loop to turn on the LED every 1 second.
I verified that the microcontroller works well, with the clock functioning at 20 Mhz.
Following Wingnut's advice, I checked all connections.
I also installed another new TFT to rule out a possible damage to the old one, but the result was the same.
Sorry for the insistence, but, to understand the situation, I created an identical program on the FWC8 and it worked perfectly, with the same TFT, the same connections and the same microcontroller.
I know the TFT configuration is more elaborate in the FWC10 version, but
I can't understand why it doesn't work.
Attached I send the video and a simple program made at FWC8 for you to analyze.
Kind regards,
Before making the changes you propose, I would like to mention that the 5 seconds at the beginning of the program are only used to wait for the microcontroller to stabilize. To confirm that the program was working, I placed an LED (RE0). After 9 seconds, the LED lights up indicating that the program is in a loop.
Following Ben's suggestion, I created another loop to turn on the LED every 1 second.
I verified that the microcontroller works well, with the clock functioning at 20 Mhz.
Following Wingnut's advice, I checked all connections.
I also installed another new TFT to rule out a possible damage to the old one, but the result was the same.
Sorry for the insistence, but, to understand the situation, I created an identical program on the FWC8 and it worked perfectly, with the same TFT, the same connections and the same microcontroller.
I know the TFT configuration is more elaborate in the FWC10 version, but
I can't understand why it doesn't work.
Attached I send the video and a simple program made at FWC8 for you to analyze.
Kind regards,
- Attachments
-
- FWC8.mp4.zip
- (4.88 MiB) Downloaded 335 times
-
- exp_FWC8.fcfx
- (8.92 KiB) Downloaded 340 times
-
- Posts: 797
- Joined: Thu Dec 03, 2020 8:25 pm
- Location: Denmark
- Has thanked: 684 times
- Been thanked: 177 times
Re: ILI9341 SPI
Hi Flaviae!
I have tryed to compile your program, with the config you have it look like for me the one sec flash is to fast I am not familiare with this device so I can´t help you with this.
In the loop you set B3 and B7 "high" and you use the same pin for the display DC and RESET, I don´t think it is good
One more thing, remember the data pin on the display is 3.3V so you need a devider, othervice it will not work, your device output is 5V..
I allow me to edit your program with a one sec flash (as Ben mentiod).
I always use ESP32- dev for these display, Ben have speed it up and they are 3.3V so no divider, I can give you an examble with this device if you want
Hope this can help you a little.
I have tryed to compile your program, with the config you have it look like for me the one sec flash is to fast I am not familiare with this device so I can´t help you with this.
In the loop you set B3 and B7 "high" and you use the same pin for the display DC and RESET, I don´t think it is good

One more thing, remember the data pin on the display is 3.3V so you need a devider, othervice it will not work, your device output is 5V..
I allow me to edit your program with a one sec flash (as Ben mentiod).
I always use ESP32- dev for these display, Ben have speed it up and they are 3.3V so no divider, I can give you an examble with this device if you want

Hope this can help you a little.

- Attachments
-
- Divider.png (158.92 KiB) Viewed 13579 times
-
- exp_FWC10.fcfx
- (17.51 KiB) Downloaded 323 times
Re: ILI9341 SPI
Good afternoon everybody.
Yesterday I couldn't come to the forum, but I'm here today with news. I tested all the changes that were proposed, with no results. Replying to jgu1, talking about the FWC10 firmware, I confirmed the D/C pins are on RB3 and Reset on RB7, despite not using Reset. Regarding the TFT pinout, I do have the board configured for 3.3V, as you correctly pointed out.
I also checked the connections in case there was a bad contact.
However, today before making another change, the FWC10 made two updates and only then I did a test using the same program and, to my surprise, it worked. I'm not really convinced it was from that update, but it actually works. As a rule, I would prefer to know the cause of the problem, but apparently it's been resolved. I thank all of you for the great support given.
Thanks.
Yesterday I couldn't come to the forum, but I'm here today with news. I tested all the changes that were proposed, with no results. Replying to jgu1, talking about the FWC10 firmware, I confirmed the D/C pins are on RB3 and Reset on RB7, despite not using Reset. Regarding the TFT pinout, I do have the board configured for 3.3V, as you correctly pointed out.
I also checked the connections in case there was a bad contact.
However, today before making another change, the FWC10 made two updates and only then I did a test using the same program and, to my surprise, it worked. I'm not really convinced it was from that update, but it actually works. As a rule, I would prefer to know the cause of the problem, but apparently it's been resolved. I thank all of you for the great support given.
Thanks.