GLCD (ILI9341) bugs

A forums to allow bugs and problems with Flowcode v6 to be reported and resolved.

Moderator: Benj

Post Reply
User avatar
Bachman
Posts: 116
Joined: Sun Sep 07, 2014 11:37 am
Location: Hungary
Has thanked: 9 times
Been thanked: 53 times
Contact:

GLCD (ILI9341) bugs

Post by Bachman »

Hello!

I tested a GLCD and found some bugs. Without any extra setup the results like this:
v1_results.jpg
(55.85 KiB) Downloaded 2447 times
Well, i set the display from 240 x 320 pixels to 320 x 240, and set the display orientation to 1. It's nearly perfect:
v2_results.jpg
(50.99 KiB) Downloaded 2447 times
Both versions uploaded (ILI9341.zip).

One thing what i don't understand. If i set the display LED connection to "Unconnected", the hex file will not be generated:

Code: Select all

Completed BoostC compilation, return = 1

C:\Program Files\Flowcode 6\compilers\pic\boostc\boostc_18F.exe reported error code 1
Why must i use the LED connection? The LED isn't connected to the display controller, like in the regular 1602 LCD (HD44780). It's a waste of a pin connection...
Attachments
ILI9341.zip
v1 & v2 source
(4.11 KiB) Downloaded 405 times

User avatar
Bachman
Posts: 116
Joined: Sun Sep 07, 2014 11:37 am
Location: Hungary
Has thanked: 9 times
Been thanked: 53 times
Contact:

Re: GLCD (ILI9341) bugs

Post by Bachman »

Hello!

Speed test. The conroller is running at 64 MHz. To fill the display with lines, took ~42 sec without the initialization. Is this normal? Looks slow.

Geometry test. In the "X" coordinatas, the first pixel numbered 1, the last is 320, in the "Y" coordinatas the first pixel numbered 0, the last 239. The "PrintNumber" & the "Print" command always printing the background.
GeometryError.jpg
(114.94 KiB) Downloaded 2431 times
All the best!
Attachments
ILI9341_Geometry_test.fcfx
(7.19 KiB) Downloaded 390 times
ILI9341_Speed_test.fcfx
(6.14 KiB) Downloaded 389 times

User avatar
Bachman
Posts: 116
Joined: Sun Sep 07, 2014 11:37 am
Location: Hungary
Has thanked: 9 times
Been thanked: 53 times
Contact:

Re: GLCD (ILI9341) bugs

Post by Bachman »

The geometry problem exists (i think) in all gLCDs, if the display orientation is other than 0. Tested with: KS0108, ILI9341, SSD1306 (I2C).

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: GLCD (ILI9341) bugs

Post by Benj »

Hello,

Right here is a updated component for the ILI9341 you can try. This should address the orientation problem but not the speed problem.

Let me know how you get on with this and I will look and see if we can improve the efficiency to get the speed up.
gLCD_ILI9341.fcpx
(7.09 KiB) Downloaded 334 times
Other gLCDs should work ok with the orientation but there could be some other displays with this bug, I will make a note to have a pass through and investigate what does and doesn't seem to support them currently.

User avatar
Bachman
Posts: 116
Joined: Sun Sep 07, 2014 11:37 am
Location: Hungary
Has thanked: 9 times
Been thanked: 53 times
Contact:

Re: GLCD (ILI9341) bugs

Post by Bachman »

Hello!

I can test it only at weekends. On workdays, i always far away from my workshop. I'll test it as fast as possible.

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: GLCD (ILI9341) bugs

Post by Benj »

I can test it only at weekends. On workdays, i always far away from my workshop. I'll test it as fast as possible.
No problems, I'm not in any rush, let me know how you get on when you have a chance.

User avatar
Bachman
Posts: 116
Joined: Sun Sep 07, 2014 11:37 am
Location: Hungary
Has thanked: 9 times
Been thanked: 53 times
Contact:

Re: GLCD (ILI9341) bugs

Post by Bachman »

Hello!

Some results with the new component. The X & Y coordinatas shift still exists. LED connection still exists. When printing number(s) or string with background on, the BG not drawn but in the top left corner the numbers and/or the letters printed with the smallest font size, see pictures.
Test1.jpg
Test1.jpg (70.49 KiB) Viewed 9174 times
Test2.jpg
Test2.jpg (69.19 KiB) Viewed 9174 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: GLCD (ILI9341) bugs

Post by Benj »

Hello,

Ok thanks for letting me know.

I have found the problem with the text background and hopefully this has now been fixed.
The X & Y coordinatas shift still exists.
This may be down to your specific LCD, the controller chips can be wired to the physical display in numerous ways. I have seen a lot of examples where 0,0 on the controller IC is not 0,0 on the display. I'm not sure what we can do about this. Maybe I could create a couple of offset properties to allow you to specify the offset on a specific display. I will look into this to see how possible it is. What do the offsets seem to be on your display?
gLCD_ILI9341.fcpx
(7.09 KiB) Downloaded 314 times

User avatar
Bachman
Posts: 116
Joined: Sun Sep 07, 2014 11:37 am
Location: Hungary
Has thanked: 9 times
Been thanked: 53 times
Contact:

Re: GLCD (ILI9341) bugs

Post by Bachman »

Hello!

I'll test it again at weekend...

Offset properties is a good idea. But! The offset problem exists only in the HW, when display orientation is not zero. This offset problem is exists in gLCD KS0108 too. To see what is the problem exactly, i'll make some test patterns.

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: GLCD (ILI9341) bugs

Post by Benj »

The offset problem exists only in the HW, when display orientation is not zero.
Aha I see, Ok I will investigate this. I'm thinking about another issue on some displays where the pixels are permanently offset. The offset properties won't effect the sim.

If we can narrow down the corruption to one of the draw routines then that might help. If you put delays in between your test pattern then you might be able to see when they are occurring.

User avatar
Bachman
Posts: 116
Joined: Sun Sep 07, 2014 11:37 am
Location: Hungary
Has thanked: 9 times
Been thanked: 53 times
Contact:

Re: GLCD (ILI9341) bugs

Post by Bachman »

Hello!

Well, the latest ILI9341 component is working well, except the X and Y coordinatas problem. The basic bug, i think, about the Width and Height of the display. The HW is 320 x 240 pixels, but the initialisation process runs as 240 x 320 pixels. See the first picture in this topic. It is hard to show the XY problem because of the 320 x 240 vs 240 x 320 problem. But, the bug is exists in the SSD1306 & KS0108 components too (and all other gLCDs?). The XY bug is hidden until you using the default orientation. It's not problem because the initialisation process good, you can use all the surface of the display except (?) ILI9341. At this time i've got only this three type of gLCDs, and i can't test others. Well, here is the results about the XY tests in SSD1306 & KS0108.
gLCD_SSD1306.jpg
gLCD_SSD1306.jpg (60.3 KiB) Viewed 9068 times
gLCD_KS0108.jpg
gLCD_KS0108.jpg (93.49 KiB) Viewed 9068 times
All the best!

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: GLCD (ILI9341) bugs

Post by Benj »

Hello,

Great that should give me what I need to fix the problems. Your pixel images look really nice on the displays!

Post Reply