Lib for ILI9486 - 3.5 inch 480x320 touch TFT for RPi

Working libraries, libraries being ported and related hardware
david.prentice
Posts: 48
Joined: Wed Nov 16, 2016 8:52 am

Re: Lib for ILI9486 - 3.5 inch 480x320 touch TFT for RPi

Postby david.prentice » Sun Jan 08, 2017 3:26 pm

Looking at the screen fill: 320x480 pixels should take at least 10.2ms for a 16-bit parallel interface (tWC=66ns)
Your test has five screen fills = 50.7ms

If you are clocking your shift registers @ 24MHz, this would be 320x480x16 bits = 103ms or 520ms for the 5 fills.
So you are achieving the optimum results from your RaspPi display.

Incidentally, experiments with an ESP8266 and an SPI ILI9341 give reliable results up to SCK=80MHz. Even though the datasheet clearly specifies SCK=10MHz. Reading GRAM is reliable up to SCK=40MHz.

An "unreadable" display does not really interest me. However, it would be interesting to see just how fast your shift registers will work. After all, the 16-bit parallel could be driven up to 10x faster.

David.

stevestrong
Posts: 722
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Lib for ILI9486 - 3.5 inch 480x320 touch TFT for RPi

Postby stevestrong » Sun Jan 08, 2017 5:20 pm

David, my original intention was just to have one display which is SPI driven. I have already one 240x320 display which is 8 bit parallel driven, and, of course, is much faster than this one. Here, I am limited by the serial->parallel converter.

I am also playing with the idea to convert this display to an 16 bit parallel one, then I could most probably achieve higher throughput, as you say.

I will next test if the display boards will work with SPI at 32MHz.

stevestrong
Posts: 722
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Lib for ILI9486 - 3.5 inch 480x320 touch TFT for RPi

Postby stevestrong » Sun Jan 08, 2017 5:39 pm

Well, it seems that 24MHz is the absolute limit. At 28 MHz (and above) there are already artifacts to be seen.

User avatar
RogerClark
Posts: 5462
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Lib for ILI9486 - 3.5 inch 480x320 touch TFT for RPi

Postby RogerClark » Sun Jan 08, 2017 8:13 pm

@stevstrong

Are you saying that lower clock speed, but zero Wait States is faster than 72Mhz at the default Wait States ?

stevestrong
Posts: 722
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Lib for ILI9486 - 3.5 inch 480x320 touch TFT for RPi

Postby stevestrong » Sun Jan 08, 2017 8:21 pm

RogerClark wrote:Are you saying that lower clock speed, but zero Wait States is faster than 72Mhz at the default Wait States ?

No. I was just wrongly assuming that at 48MHz with 0 wait states the CPU would actually execute instructions with 48MHz, instead of at 72MHz with 2 wait states, which would yield CPU instructions with 24MHz.
This is not the case. The flash wait states have not more than 20% influence. More important is the CPU clock frequency.
Also see here.
What would maybe happen that 48MHz with 0 wait states equals 56MHz with 2 wait states.

User avatar
RogerClark
Posts: 5462
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Lib for ILI9486 - 3.5 inch 480x320 touch TFT for RPi

Postby RogerClark » Sun Jan 08, 2017 8:26 pm

OK.

Is there any benefit to running at 48MHz, except slightly reduced power consumption ?

stevestrong
Posts: 722
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Lib for ILI9486 - 3.5 inch 480x320 touch TFT for RPi

Postby stevestrong » Sun Jan 08, 2017 8:30 pm

YESS. The display runs at the highest possible supported SPI frequency (24MHz) :D
Last edited by stevestrong on Mon Jan 09, 2017 1:55 pm, edited 1 time in total.

User avatar
RogerClark
Posts: 5462
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Lib for ILI9486 - 3.5 inch 480x320 touch TFT for RPi

Postby RogerClark » Sun Jan 08, 2017 8:42 pm

Ok.

Is it possible to overclock the display at 36MHz like we do for the ILI9341?

( I think perhaps the answer is No, otherwise you would not try 24MHz)

stevestrong
Posts: 722
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Lib for ILI9486 - 3.5 inch 480x320 touch TFT for RPi

Postby stevestrong » Sun Jan 08, 2017 8:49 pm

The bottleneck is the serial->parallel converter circuit, the HC chip working frequencies are strongly limited by the supply voltage.
They are supplied by the on-board 3.3V power adapter. At 3.3V they only support up to 24MHz. I tested 28, 32 and 36 MHz, none of them works reliably.
I tried to give them 5V, they worked better, but still not 100% at 36 MHz.

So if I really want to speed up more the display, I have to drive it pure parallel, direct from BP (over PB0..15).
Otherwise stick to 24MHz.

Or dismount the display and drive directly the ILI SPI pins...

stevestrong
Posts: 722
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Lib for ILI9486 - 3.5 inch 480x320 touch TFT for RPi

Postby stevestrong » Sun Jan 08, 2017 9:31 pm

The funny part is, some of the graphicstests (text, lines and all outlines, where many single pixel writes take place) runs better with lower SPI clock but higher CPU frequency, than vice versa. OTOH, obviously, large block fillings are faster with higher SPI clock, where the CPU frequency does not really count.
So it really depends on the application, which variant one should use.


Return to “Libraries & Hardware”

Who is online

Users browsing this forum: No registered users and 1 guest