Author Topic: ILI9341 LCD driver, max SPI clock speed?  (Read 11084 times)

bastelWastel and 4 Guests are viewing this topic.

Offline Chris C

  • Frequent Contributor
  • **
  • Posts: 259
  • Country: us
ILI9341 LCD driver, max SPI clock speed?
« on: August 16, 2015, 05:03:26 pm »
I'm using an ILI9341-based LCD module, and the 4-wire SPI interface to communicate with it.  According to the datasheet's spec for this interface, I should be able to write at up to 1s/100ns(twc)=10Mhz, and read at up to 1s/150ns(trc)=6.66Mhz.

However, I am successfully writing and reading at 24Mhz!  Not just for a simple test case, either.  I'm doing complex graphics, mixed reads/writes for alpha blends, both 16-bit and 24-bit pixel writes, and so on - yet haven't seen a single glitch.  (Except those caused when I bump my dodgy old breadboard or jumper wires.  That I'm using such poor connections, and it's still working at this speed when not physically disturbed, make this even more amazing.  The signal integrity must be horrible.)

In the past I've tried communicating with other complex SPI devices at speeds past their ratings, just to see what would happen.  All started showing issues with modest increases, even when run at max Vdd.  Yet I'm reading from this at 360% of its max rated speed!  And I know of cases of others doing the same with their ILI9341-based LCD, as well.

All of which really makes me question whether I've read the spec and converted from ns to Mhz properly.  Did I simply make a stupid mistake?  Here's the relevant page from the datasheet:

 
The following users thanked this post: thm_w

Offline madires

  • Super Contributor
  • ***
  • Posts: 5146
  • Country: de
  • A qualified hobbyist ;)
Re: ILI9341 LCD driver, max SPI clock speed?
« Reply #1 on: August 16, 2015, 05:57:09 pm »
I'm reading the ILI9341's datasheet right now (going to add support to the Transistortester) and I think your calculations are correct. A quick web search lists some blog postings claiming that a 24, 36 and even 48 MHz SPI clock runs fine.
 

Offline Chris C

  • Frequent Contributor
  • **
  • Posts: 259
  • Country: us
Re: ILI9341 LCD driver, max SPI clock speed?
« Reply #2 on: August 16, 2015, 11:53:34 pm »
Hmm, odd.  I wonder why they underrated it so much.  Or if individual variation between ICs is incredibly large.

Or perhaps that rating applies only at the lowest core voltage.  In looking over the initial register setup provided with the module, I noticed what appears to be an option to change that voltage, and that it's being set one step short of max.

BTW, if you're talking about the same Transistortester that I think you are, that's an amazing project!  And one I will be benefiting from shortly, if my package ever shows up. :)  I'm familiar with most of the ILI9341, having written my own PIC-based driver for the ILI9341 for it.  Should you run into any difficulties, I may be able to help, and will certainly be willing to try.
 

Offline DavidMenting

  • Contributor
  • Posts: 41
  • Country: nl
    • Nut & Bolt interaction design
Re: ILI9341 LCD driver, max SPI clock speed?
« Reply #3 on: August 17, 2015, 01:55:36 pm »
I was pleasantly surprised by this fact as well. I'm running 16 of them at the same time at a bit over 30 MHz in this art installation:
 

Offline Chris C

  • Frequent Contributor
  • **
  • Posts: 259
  • Country: us
Re: ILI9341 LCD driver, max SPI clock speed?
« Reply #4 on: August 17, 2015, 05:23:15 pm »
That's a wonderful zoetrope!  Thanks for sharing it.
 

Online bastelWastel

  • Newbie
  • Posts: 1
  • Country: de
Re: ILI9341 LCD driver, max SPI clock speed?
« Reply #5 on: May 13, 2020, 10:20:08 am »
I ended at SCLK=78.75 (315M/4) these days. Thanks for the Timing Chart posted above. For 2 weeks I was looking for this information despite I have the ILI datasheet! But seemingly I always stopped searching at the signal charts in chapter #7.  |O

 

Offline madires

  • Super Contributor
  • ***
  • Posts: 5146
  • Country: de
  • A qualified hobbyist ;)
Re: ILI9341 LCD driver, max SPI clock speed?
« Reply #6 on: May 13, 2020, 01:07:48 pm »
Welcome to the display overclockers! ;D
 

Offline soFPG

  • Regular Contributor
  • *
  • Posts: 152
  • Country: de
Re: ILI9341 LCD driver, max SPI clock speed?
« Reply #7 on: May 15, 2020, 01:20:07 pm »
Which controller does 80MHz SPI? ESP8266?
8-Bit parallel would probably be easier in case you don't have an 80MHz SPI capable ┬ÁC
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 5146
  • Country: de
  • A qualified hobbyist ;)
Re: ILI9341 LCD driver, max SPI clock speed?
« Reply #8 on: May 15, 2020, 01:59:10 pm »
You should be able to find ARM based MCUs with a sufficient clock rate. I have no idea about the ESP8266 which runs at 80 or 160MHz. A quick search shows that the SPI clock is derived from the system bus which runs at 80MHz and the smallest divider is 1. So it should be able to do 80MHz SPI.
 

Offline Theboel

  • Frequent Contributor
  • **
  • Posts: 264
  • Country: id
Re: ILI9341 LCD driver, max SPI clock speed?
« Reply #9 on: May 15, 2020, 02:01:12 pm »
I use ILI9341 with arduino nano my problem is the graphic look in slow motion/ slow update I really apreciate if someone can help me to solve this problem based from this "OC discussion" :palm: :palm: :palm: :palm:
 

Online TK

  • Super Contributor
  • ***
  • Posts: 1465
  • Country: us
  • I am a Systems Analyst who plays with Electronics
Re: ILI9341 LCD driver, max SPI clock speed?
« Reply #10 on: May 15, 2020, 02:04:04 pm »
STM32 @ 180MHz can do 45MHz SPI.  The Teensy 4.0 runs an NXP cortex-m7 micro @ 600MHz, I have not tested SPI but I estimate it can go over 100MHz.
 

Online TK

  • Super Contributor
  • ***
  • Posts: 1465
  • Country: us
  • I am a Systems Analyst who plays with Electronics
Re: ILI9341 LCD driver, max SPI clock speed?
« Reply #11 on: May 15, 2020, 02:05:26 pm »
The spec posted by OP says MIN 100ns, so it is minimum 10MHz.  Am I missing something?
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 5146
  • Country: de
  • A qualified hobbyist ;)
Re: ILI9341 LCD driver, max SPI clock speed?
« Reply #12 on: May 15, 2020, 02:16:54 pm »
I use ILI9341 with arduino nano my problem is the graphic look in slow motion/ slow update I really apreciate if someone can help me to solve this problem based from this "OC discussion" :palm: :palm: :palm: :palm:

Max SPI clock rate for an ATmega328 running at 16MHz is clk/2 = 8MHz when using the hardware SPI. Bit-bang SPI is way to slow.
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 5146
  • Country: de
  • A qualified hobbyist ;)
Re: ILI9341 LCD driver, max SPI clock speed?
« Reply #13 on: May 15, 2020, 02:20:36 pm »
The spec posted by OP says MIN 100ns, so it is minimum 10MHz.  Am I missing something?

Yep, that's what the datasheets states. But several people tried higher SPI clock rates and the ILI9341/9342 was still happy. So we wonder what the real maximum is.
 

Online TK

  • Super Contributor
  • ***
  • Posts: 1465
  • Country: us
  • I am a Systems Analyst who plays with Electronics
Re: ILI9341 LCD driver, max SPI clock speed?
« Reply #14 on: May 15, 2020, 03:27:40 pm »
There is an interesting discussion on the Teensy forum about running ILI9341 @ 80MHz with a Teensy 4.0 board

https://forum.pjrc.com/threads/57652-Teensy-4-SPI-bus-gt-38mhz-possible
 

Offline ajb

  • Super Contributor
  • ***
  • Posts: 1770
  • Country: us
Re: ILI9341 LCD driver, max SPI clock speed?
« Reply #15 on: May 15, 2020, 06:10:29 pm »
The spec posted by OP says MIN 100ns, so it is minimum 10MHz.  Am I missing something?

Time and frequency are inverse of each other, so minimum time determines maximum frequency and vice versa.  As frequency goes up, period goes down, so anything above 10MHz will have <100ns period, and therefore violates the minimum time specification.

I wonder if this means that the parallel interface can also be run faster than spec.  Being able to write 16bits @ >15MHz would be nice.
« Last Edit: May 15, 2020, 06:14:47 pm by ajb »
 

Online TK

  • Super Contributor
  • ***
  • Posts: 1465
  • Country: us
  • I am a Systems Analyst who plays with Electronics
Re: ILI9341 LCD driver, max SPI clock speed?
« Reply #16 on: May 15, 2020, 06:29:26 pm »
The spec posted by OP says MIN 100ns, so it is minimum 10MHz.  Am I missing something?

Time and frequency are inverse of each other, so minimum time determines maximum frequency and vice versa.  As frequency goes up, period goes down, so anything above 10MHz will have <100ns period, and therefore violates the minimum time specification.

I wonder if this means that the parallel interface can also be run faster than spec.  Being able to write 16bits @ >15MHz would be nice.
You are totally right... I had my senior moment...   :palm:
 

Offline newbrain

  • Frequent Contributor
  • **
  • Posts: 834
  • Country: se
Re: ILI9341 LCD driver, max SPI clock speed?
« Reply #17 on: May 19, 2020, 09:19:02 am »
Just a single data point, but with a different controller: The HX8357-D, in a 3.5" Adafruit display.

I'm running it with the SPI (from an i.MX RT1021 evaluation board) at 45MHz: three times the maximum write clock frequency in the datasheet.
No glitches or crashes.

These controller chips seem to take a lot more than they are specified for.
Nandemo wa shiranai wa yo, shitteru koto dake.
 
The following users thanked this post: thm_w

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 15045
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: ILI9341 LCD driver, max SPI clock speed?
« Reply #18 on: May 19, 2020, 09:30:37 am »
FYI, the ST7735 and RM68050 do seem to run out of poop, near their rated timings.

It's been a few years since I was actively developing with them so I don't remember exactly what or how much.  My platform only has powers of 2 SPI clock control (prescalers) so I wasn't able to push very close to ratings.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf