I took the test for hardware SPI out and just assumed it was true.
I imagine you could accomplish the same thing with some clever #ifdefs and retain the flexibility but I just took an axe to it.
I'd like to optimize the bitmap stuff. I think you could use a native 16 bit color bitmap file, stop using the drawPixel() function and get some amazing performance improvements but it's more involved if you want to keep the ability to rotate the display. The native color files should actually be 33% smaller than the bmp files too. Volunteers?
The speed savings from dumbing down were surprising. These were the results from running the example graphicstest.ino
_______ Before modification
ILI9341 Test!
Display Power Mode: 0x9C
MADCTL Mode: 0x48
Pixel Format: 0x5
Image Format: 0x9C
Self Diagnostic: 0xC0
Benchmark Time (microseconds)
Screen fill 2561064
Text 319428
Lines 3118816
Horiz/Vert Lines 222976
Rectangles (outline) 148500
Rectangles (filled) 5319708
Circles (filled) 1168244
Circles (outline) 1357484
Triangles (outline) 990344
Triangles (filled) 2083680
Rounded rects (outline) 511680
Rounded rects (filled) 5964704
Done!
_______ after
ILI9341 Test!
Display Power Mode: 0x9C
MADCTL Mode: 0x48
Pixel Format: 0x5
Image Format: 0x9C
Self Diagnostic: 0xC0
Benchmark Time (microseconds)
Screen fill 1498740
Text 265508
Lines 2608792
Horiz/Vert Lines 136116
Rectangles (outline) 93184
Rectangles (filled) 3113632
Circles (filled) 858452
Circles (outline) 1134444
Triangles (outline) 828584
Triangles (filled) 1365888
Rounded rects (outline) 406044
Rounded rects (filled) 3563644
Done!
9341 tft library speedup by dumbing down
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- normlane
- Posts: 128
- Joined: Thu Apr 01, 2010 5:39 pm
9341 tft library speedup by dumbing down
- Attachments
-
- Adafruit_ILI9341_master_fast.zip
- (17.63 KiB) Downloaded 37 times
- adafruit_support_bill
- Posts: 88155
- Joined: Sat Feb 07, 2009 10:11 am
Re: 9341 tft library speedup by dumbing down
Yup! Simplifying assumptions can make a world of difference in performance.
Please be positive and constructive with your questions and comments.