ILI931, rp2040, 8bit vs 16bit parallel performance ? #2059
Replies: 3 comments 2 replies
-
Different TFT controllers can cope with different write cycle timings, so since I have not tested the ILI9341 with 16 bit parallel (I do not have a suitable display) I have set the default to a longer cycle time. You can see the speed constraining code here: Try a value of 1 or 2 in this line: The TFT_graphicstest_one_lib example ususally shows up duff pixels at some point in the test if the cycle time is too small. Let me know what works reliably. |
Beta Was this translation helpful? Give feedback.
-
The performance depends on the type of graphics operation. All commands and command register writes are always 8 bits parallel. To write a single pixel 11 x 8 bit commands/data register values are written (to set the graphics rectangle address window) followed by 1 x 16 bit pixel colour (two 8 bit writes or one 16 bit write), also the DC line must be toggled so there is almost no difference for a single pixel. Large pixel block writes such as fillScreen are where 16bits has the advantage, then 11 command/data bytes are written followed by "N" pixels, where N is large the overhead of the 11 bytes to set the window is tiny. These are the results of running "TFT_graphicstest_one_lib" sketch on a 320x480 display with timing and totals, note that cycle time is saved if the CS line is NOT defined and the CS line is tied permanently low:
Notice how fillScreen is nearly twice as fast, but individual pixel intensive graphics operations (that required the address window to be repeatedlt redefined) have little speed advantage. I would expect the ILI9341 to run nearly 2x faster for the screen fill as it has half the number of pixels. |
Beta Was this translation helpful? Give feedback.
-
Normally the library waits for a graphics function to finish before returning control to the sketch, since the PIO hardware handles writes to the screen it is possible to tell the library not to wait by putting tft.startWrite(); before a block of operations or even once after tft.init() in setup(). Then if a graphics function such as tft.fillScreen() is executed, the function returns immediately after setting the PIO registers. This means that the sketch runs on even though the fillScreen is still in progress. Since the PIO only has a small FIFO the driect write commands cannot be queued, so if a fillSCreen is followed by a drawPixel, then the drawPixel function will wait for the fillScreen to complete before it is executed. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I just finished wiring up a couple displays to play around with the new 16 bit option.
First display was a 480x320 ( ILI9481, but seems to work better when HX8753B is selected ) unit that I found on lcd-wiki, and it works great, very good performance, seems like a huge step up from 8bit mode or SPI.
Next I tried a 320x240 ILI9341 driver, and was kinda bummed, as using the 16 bit mode actually ran a bit slower than the same Ili9341 in 8bit mode, it’s still blazing fast, but is this normal? I used the same pin assignments for both the 9481 and the 9341 displays.
I would assume that the 16bit mode should be faster in any given case but on the smaller display it’s not, or am I doing something wrong.
Pin out :
RST. 27
TFT_WR 22
TFT_DC 28
TFT_D0 6
Through (Sequentially)
TTFT_D15 21
this isn’t a huge deal, as the ili9341 display is already faster than I need it to be in 8 bit mode.
What is really great now is that the 480x320 performance is really good.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions