PaulStoffregen / ILI9341_t3

Optimized ILI9341 TFT Library
http://pjrc.com/store/display_ili9341.html
245 stars 95 forks source link

Added ability to set SPI clock speed #60

Closed bitbank2 closed 4 years ago

bitbank2 commented 4 years ago

The original class used a fixed SPI speed of 30Mhz. This is a reasonable / safe default, but most ILI9341 LCDs are capable of running much faster. I added a new public method "setClock" which allows you to set different speeds. My Teensy 4.1 on a perfboard with 10cm wires to a generic 2.8" LCD is able to run reliably at 80Mhz. The performance test (with my addition of a proportional font test) gives the following results:

ILI9341 Test! Display Power Mode: 0x0 MADCTL Mode: 0x0 Pixel Format: 0x0 Image Format: 0x0 Self Diagnostic: 0x0 Benchmark Time (microseconds) Screen fill 78257 Text 5114 Proportional Text 8574 Lines 36802 Horiz/Vert Lines 6735 Rectangles (outline) 4431 Rectangles (filled) 161337 Circles (filled) 31221 Circles (outline) 27779 Triangles (outline) 8427 Triangles (filled) 58376 Rounded rects (outline) 12564 Rounded rects (filled) 180646 Done!