display ili9341 slow update

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
maxtisc
Posts: 110
Joined: Mon Dec 23, 2013 9:34 pm
Has thanked: 2 times
Been thanked: 9 times
Contact:

display ili9341 slow update

Post by maxtisc »

hello to all the community
I'm using a display with driver ili9341, as shown in the video to the display,
the problem is that the display is slow to update. any of you knows me a possible solution to this problem?
the PIC microcontroller is a 18f87k22 working at 64MHz (16Mhz with PLL X4 enable)
I have also taken steps to update the component as indicated in a previous post by Benj
Thanks to all for the tips
Attachments
video.zip
the video is compressed because it allows me to upload files to .MP4
(1.4 MiB) Downloaded 281 times
ili9341 encorder.fcfx
(36.59 KiB) Downloaded 281 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: display ili9341 slow update

Post by Benj »

Hello,

In your project options change the clock speed to 64000000 to allow delays to be correct for your target clock speed.

Then to confirm your chip is running at the right speed can you do a 1 second flasher test. Details are available from here. http://www.matrixtsl.com/wiki/index.php ... ED_flasher

maxtisc
Posts: 110
Joined: Mon Dec 23, 2013 9:34 pm
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: display ili9341 slow update

Post by maxtisc »

well thanks for the answer, but this test set 64000000 seems to have already made without any positive results, now I'm out of town, Friday try again and let you know.
thank you

maxtisc
Posts: 110
Joined: Mon Dec 23, 2013 9:34 pm
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: display ili9341 slow update

Post by maxtisc »

hello benj
I tried the settings you said, but did not affect the display is always slow.
I tried the LED flash and it works
you have any other suggestions?
thank you

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: display ili9341 slow update

Post by Benj »

Hello,

When you say the LED flash works, it is flashing at the correct rate as specified by the delays you used? If the delays are not right then it could be the chip is running but not at the speed you think it is.

If the delays are ok then the chip is likely correctly running at 64MHz.

I'll look at the code again but from your video I would guess that the chip is not running at 64MHz.

Edit - The display is 16-bit colour per pixel so I guess this may explain the slowness, see below for a potential fix.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: display ili9341 slow update

Post by Benj »

If you let me know your specific pin connections then I can potentially make you a version of the component that has fixed pins and this may speed up the bit banging routines a bit.

I'm investigating this now. Edit - Might help a bit.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: display ili9341 slow update

Post by Benj »

Hello,

I have managed to find a way to cut down on the amount of data sent to the LCD when printing strings and numbers. Have a go with this and see if this improves things.
gLCD_ILI9341.fcpx
(7.16 KiB) Downloaded 284 times
Fixed pins should help to increase the speed further.

maxtisc
Posts: 110
Joined: Mon Dec 23, 2013 9:34 pm
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: display ili9341 slow update

Post by maxtisc »

Hello
for testing LEDs I used the example that I've shown you (http://www.matrixtsl.com/wiki/index.php ... ED_flasher), with the settings I use in my project.
I upgraded component in Flowcode and also in simulation seems faster, I will as soon as a hardware test, and inform you about the results
thank you

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: display ili9341 slow update

Post by Benj »

Hello,

The simulation for the gLCD has just had an overhaul to stop it spamming the Flowcode .C file, I forgot to mention this and I'm surprised the sim is even running with the release version of the GLCD_BASE component. Still if it is and it seems faster then that's brilliant :D

The embedded side should hopefully be much better but there is a possibility that the indexing runs horizontally rather than vertically which will make things a bit trickier in terms of the code. It will either work or be garbled but it should be a lot faster. If it's garbled then I can fix it by sacrificing a bit of the speed boost.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: display ili9341 slow update

Post by Benj »

Hello,

Here is another component you can try just in case the first one I send does result in garbled text. This will likely be slightly slower than before but still hopefully a lot faster than the original.
gLCD_ILI9341.fcpx
(7.18 KiB) Downloaded 279 times
Let me know how you get on.

maxtisc
Posts: 110
Joined: Mon Dec 23, 2013 9:34 pm
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: display ili9341 slow update

Post by maxtisc »

hi Benji
first of all thanks for your help
I tried the components that you changed, the first did not work, the second one is faster than Original, but there is a new problem, practically the screen rotation lock is not working and the display always vertical, the second problem is that the cancellation of the page has remained slow.
see if you can do something for these
thank you very much
Attachments
20160205_215430.rar
video
(1.06 MiB) Downloaded 291 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: display ili9341 slow update

Post by Benj »

Hello,

Hopefully this should allow the speed increase text to work with the orientation settings.
gLCD_ILI9341.fcpx
(7.33 KiB) Downloaded 245 times
Let me know how you get on.

maxtisc
Posts: 110
Joined: Mon Dec 23, 2013 9:34 pm
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: display ili9341 slow update

Post by maxtisc »

hello Benji
I used your last version, but does not work in hardware, practically rotates the screen but writes all in one line
thank you
Attachments
20160208_154739.rar
video
(348 KiB) Downloaded 251 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: display ili9341 slow update

Post by Benj »

Hello,

Thanks for letting me know. I think I know what would cause this.

Here is an updated version.
gLCD_ILI9341.fcpx
(7.36 KiB) Downloaded 218 times

maxtisc
Posts: 110
Joined: Mon Dec 23, 2013 9:34 pm
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: display ili9341 slow update

Post by maxtisc »

hello Benji
unfortunately it does not work, missing words and writes the contrary as if they were reflected by a mirror
ciao
Last edited by maxtisc on Mon Feb 08, 2016 4:49 pm, edited 1 time in total.

maxtisc
Posts: 110
Joined: Mon Dec 23, 2013 9:34 pm
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: display ili9341 slow update

Post by maxtisc »

sorry for the photo

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: display ili9341 slow update

Post by Benj »

Hello,

Can you tell me what orientation value your using in your program.

Also could you create a program that uses orientation 0 and prints a string, then orientation 1 and prints a string etc.

Each orientation may or may not work so if you can document what is and isn't working and what's currently happening (mirrored, upside down etc) then hopefully I can get it all sorted for you.

maxtisc
Posts: 110
Joined: Mon Dec 23, 2013 9:34 pm
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: display ili9341 slow update

Post by maxtisc »

I use orientation 1 (90 °) or 3 (270 °), with the orientation to 1 you have the mirror effect, with guidance 3 reads only part of the display
see video
Attachments
Desktop.rar
video
(791.97 KiB) Downloaded 241 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: display ili9341 slow update

Post by Benj »

Many thanks,

From your video it looks like orientation 1 is upside down and orientation 3 is moving the wrong way across the display.

This should fix the orientaion 1 bug, I'll think about the orientation 3 bug and see if I can find a way to solve this.
gLCD_ILI9341.fcpx
(7.36 KiB) Downloaded 211 times

maxtisc
Posts: 110
Joined: Mon Dec 23, 2013 9:34 pm
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: display ili9341 slow update

Post by maxtisc »

the orientation is fine, but is missing the first row
Attachments
20160208_172124.rar
video missing row
(256.69 KiB) Downloaded 232 times

maxtisc
Posts: 110
Joined: Mon Dec 23, 2013 9:34 pm
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: display ili9341 slow update

Post by maxtisc »

Hello
I installed the latest version 6.1.3.2 but dispaly ili9341 block remains the bug rotation (option 3) that does not work, and it remains slow in the process of cleaning the display.
this time I did some tests with Arduino due, in some tests using the SPI port to drive the display and is fast (see video), in other tests using digital I / O ports and is slow.
you can edit the macro component to use the SPI port?
bye thank you
Attachments
20160313_221150.zip
video arduino due with ili9341
(4.1 MiB) Downloaded 157 times

Post Reply